You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
545 B

const _ = require('lodash');
const Debug = require('../../helper/debug');
const debugLog = new Debug('controller:predicates:is_request_sources_undefined');
const stackTraceLine = require('../../helper/stackTraceLine');
// returns true IFF there are no requested sources
module.exports = (req, res) => {
const is_request_sources_undefined = _.isEmpty(
_.get(req, 'clean.sources')
);
debugLog.push(req, () => ({
reply: is_request_sources_undefined,
stack_trace: stackTraceLine()
}));
return is_request_sources_undefined;
};