packages/ove-core/src/server/api.js
function (req, res) {
        let sectionId = req.query.oveSectionId;
        if (sectionId === undefined) {
            log.debug('Returning parsed result of ' + Constants.SPACES_JSON_FILENAME);
            Utils.sendMessage(res, HttpStatus.OK, JSON.stringify(server.spaces));
        } else if (!server.state.get('sections[' + sectionId + ']')) {
            log.debug('Unable to produce list of spaces for section id:', sectionId);
            Utils.sendEmptySuccess(res);
        } else {
            log.debug('Returning parsed result of ' + Constants.SPACES_JSON_FILENAME + ' for section id:', sectionId);
            Utils.sendMessage(res, HttpStatus.OK, JSON.stringify(server.state.get('sections[' + sectionId + '][spaces]')));
        }
    }
function (req, res) {
        let sectionId = req.query.oveSectionId;
        if (sectionId === undefined) {
            log.debug('Returning parsed result of ' + Constants.SPACES_JSON_FILENAME);
            Utils.sendMessage(res, HttpStatus.OK, JSON.stringify(server.spaces));
        } else if (!server.state.get('sections[' + sectionId + ']')) {
            log.debug('Unable to produce list of spaces for section id:', sectionId);
            Utils.sendEmptySuccess(res);
        } else {
            log.debug('Returning parsed result of ' + Constants.SPACES_JSON_FILENAME + ' for section id:', sectionId);
            Utils.sendMessage(res, HttpStatus.OK, JSON.stringify(server.state.get('sections[' + sectionId + '][spaces]')));
        }
    }
function ( req , res ) { let sectionId = req . query . oveSectionId ; if ( sectionId === undefined ) { log . debug ( 'Returning parsed result of ' + Constants . SPACES_JSON_FILENAME ) ; Utils . sendMessage ( res , HttpStatus . OK , JSON . stringify ( server . spaces ) ) ; } else if ( ! server . state . get ( 'sections[' + sectionId + ']' ) ) { log . debug ( 'Unable to produce list of spaces for section id:' , sectionId ) ; Utils . sendEmptySuccess ( res ) ; } else { log . debug ( 'Returning parsed result of ' + Constants . SPACES_JSON_FILENAME + ' for section id:' , sectionId ) ; Utils . sendMessage ( res , HttpStatus . OK , JSON . stringify ( server . state . get ( 'sections[' + sectionId + '][spaces]' ) ) ) ; } }
Lists details of all spaces, and accepts filters as a part of its query string.
Lists details of all spaces and accepts filters as a part of its query string .