mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
13 lines
300 B
JavaScript
13 lines
300 B
JavaScript
|
const errors = require('@tryghost/errors');
|
||
|
const labsUtil = require('../../../../shared/labs');
|
||
|
|
||
|
const labs = flag => (req, res, next) => {
|
||
|
if (labsUtil.isSet(flag) === true) {
|
||
|
return next();
|
||
|
} else {
|
||
|
return next(new errors.NotFoundError());
|
||
|
}
|
||
|
};
|
||
|
|
||
|
module.exports = labs;
|