packages/ove-core/src/server/api.js
function (groupId) {
        server.state.set('groups[' + groupId + ']', []);
        let hasNonEmptyGroups = false;
        server.state.get('groups').forEach(function (e) {
            if (!Utils.isNullOrEmpty(e)) {
                hasNonEmptyGroups = true;
            }
        });
        if (hasNonEmptyGroups) {
            log.info('Successfully deleted group:', groupId);
        } else {
            server.state.set('groups', []);
            log.info('Successfully deleted all groups');
        }
    }
function (groupId) {
        server.state.set('groups[' + groupId + ']', []);
        let hasNonEmptyGroups = false;
        server.state.get('groups').forEach(function (e) {
            if (!Utils.isNullOrEmpty(e)) {
                hasNonEmptyGroups = true;
            }
        });
        if (hasNonEmptyGroups) {
            log.info('Successfully deleted group:', groupId);
        } else {
            server.state.set('groups', []);
            log.info('Successfully deleted all groups');
        }
    }
function ( groupId ) { server . state . set ( 'groups[' + groupId + ']' , [ ] ) ; let hasNonEmptyGroups = false ; server . state . get ( 'groups' ) . forEach ( function ( e ) { if ( ! Utils . isNullOrEmpty ( e ) ) { hasNonEmptyGroups = true ; } } ) ; if ( hasNonEmptyGroups ) { log . info ( 'Successfully deleted group:' , groupId ) ; } else { server . state . set ( 'groups' , [ ] ) ; log . info ( 'Successfully deleted all groups' ) ; } }
Internal utility function to delete a group by the given id
Internal utility function to delete a group by the given id