packages/ove-core/src/server/api.js
function (req, res) {
        const spaceName = req.params.name;
        const geometry = _getSpaceGeometries()[spaceName];
        if (Utils.isNullOrEmpty(geometry)) {
            log.error('Invalid Space', 'name:', spaceName);
            Utils.sendMessage(res, HttpStatus.BAD_REQUEST, JSON.stringify({ error: 'invalid space' }));
        } else {
            log.debug('Returning geometry for space:', spaceName);
            Utils.sendMessage(res, HttpStatus.OK, JSON.stringify(geometry));
        }
    }
function (req, res) {
        const spaceName = req.params.name;
        const geometry = _getSpaceGeometries()[spaceName];
        if (Utils.isNullOrEmpty(geometry)) {
            log.error('Invalid Space', 'name:', spaceName);
            Utils.sendMessage(res, HttpStatus.BAD_REQUEST, JSON.stringify({ error: 'invalid space' }));
        } else {
            log.debug('Returning geometry for space:', spaceName);
            Utils.sendMessage(res, HttpStatus.OK, JSON.stringify(geometry));
        }
    }
function ( req , res ) { const spaceName = req . params . name ; const geometry = _getSpaceGeometries ( ) [ spaceName ] ; if ( Utils . isNullOrEmpty ( geometry ) ) { log . error ( 'Invalid Space' , 'name:' , spaceName ) ; Utils . sendMessage ( res , HttpStatus . BAD_REQUEST , JSON . stringify ( { error : 'invalid space' } ) ) ; } else { log . debug ( 'Returning geometry for space:' , spaceName ) ; Utils . sendMessage ( res , HttpStatus . OK , JSON . stringify ( geometry ) ) ; } }
Gets geometry of a named space.
Gets geometry of a named space .