packages/ove-core/src/server/api.js
function (req, res) {
        let sectionId = req.params.id;
        if (Utils.isNullOrEmpty(server.state.get('sections[' + sectionId + ']'))) {
            log.error('Invalid Section Id:', sectionId);
            Utils.sendMessage(res, HttpStatus.BAD_REQUEST, JSON.stringify({ error: 'invalid section id' }));
        } else {
            _deleteSectionById(sectionId);
            log.info('Successfully deleted section:', sectionId);
            Utils.sendMessage(res, HttpStatus.OK, JSON.stringify({ ids: [ parseInt(sectionId, 10) ] }));
        }
    }
function (req, res) {
        let sectionId = req.params.id;
        if (Utils.isNullOrEmpty(server.state.get('sections[' + sectionId + ']'))) {
            log.error('Invalid Section Id:', sectionId);
            Utils.sendMessage(res, HttpStatus.BAD_REQUEST, JSON.stringify({ error: 'invalid section id' }));
        } else {
            _deleteSectionById(sectionId);
            log.info('Successfully deleted section:', sectionId);
            Utils.sendMessage(res, HttpStatus.OK, JSON.stringify({ ids: [ parseInt(sectionId, 10) ] }));
        }
    }
function ( req , res ) { let sectionId = req . params . id ; if ( Utils . isNullOrEmpty ( server . state . get ( 'sections[' + sectionId + ']' ) ) ) { log . error ( 'Invalid Section Id:' , sectionId ) ; Utils . sendMessage ( res , HttpStatus . BAD_REQUEST , JSON . stringify ( { error : 'invalid section id' } ) ) ; } else { _deleteSectionById ( sectionId ) ; log . info ( 'Successfully deleted section:' , sectionId ) ; Utils . sendMessage ( res , HttpStatus . OK , JSON . stringify ( { ids : [ parseInt ( sectionId , 10 ) ] } ) ) ; } }
Deletes an individual section
Deletes an individual section