0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/web/shared/middlewares/labs.js

13 lines
299 B
JavaScript
Raw Normal View History

const errors = require('@tryghost/errors');
const labsUtil = require('../../../services/labs');
const labs = flag => (req, res, next) => {
if (labsUtil.isSet(flag) === true) {
return next();
} else {
return next(new errors.NotFoundError());
}
};
module.exports = labs;