Ghost/core/server/web/shared/middlewares/labs.js
Rishabh Garg 8fd4b3f09f
Added new admin API for members (#10435)
no issue

- Added read and browse admin API for members
2019-01-30 17:06:09 +05:30

22 lines
551 B
JavaScript

const labsUtil = require('../../../services/labs');
const common = require('../../../lib/common');
const labs = {
subscribers(req, res, next) {
if (labsUtil.isSet('subscribers') === true) {
return next();
} else {
return next(new common.errors.NotFoundError());
}
},
members(req, res, next) {
if (labsUtil.isSet('members') === true) {
return next();
} else {
return next(new common.errors.NotFoundError());
}
}
};
module.exports = labs;