0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/web/shared/middlewares/labs.js

15 lines
342 B
JavaScript
Raw Normal View History

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.members = labs('members');
module.exports = labs;