235d6a0366
no-issue Also exposes a generic interface now.
16 lines
382 B
JavaScript
16 lines
382 B
JavaScript
const labsUtil = require('../../../services/labs');
|
|
const common = require('../../../lib/common');
|
|
|
|
const labs = flag => (req, res, next) => {
|
|
if (labsUtil.isSet(flag) === true) {
|
|
return next();
|
|
} else {
|
|
return next(new common.errors.NotFoundError());
|
|
}
|
|
};
|
|
|
|
labs.subscribers = labs('subscribers');
|
|
labs.members = labs('members');
|
|
|
|
module.exports = labs;
|