model/mongo.js
function (soajs, id) {
        let id1;
        try {
            id1 = soajs.mongoDb.ObjectId(id.toString());
            return id1;
        }
        catch (e) {
            soajs.log.error(e);
            throw e;
        }
    }
function (soajs, id) {
        let id1;
        try {
            id1 = soajs.mongoDb.ObjectId(id.toString());
            return id1;
        }
        catch (e) {
            soajs.log.error(e);
            throw e;
        }
    }
function ( soajs , id ) { let id1 ; try { id1 = soajs . mongoDb . ObjectId ( id . toString ( ) ) ; return id1 ; } catch ( e ) { soajs . log . error ( e ) ; throw e ; } }
Validates the mongo object ID
Validates the mongo object ID