ghost
Version:
The professional publishing platform
18 lines (14 loc) • 517 B
JavaScript
const debug = require('@tryghost/debug')('api:endpoints:utils:validators:input:updateSetup');
const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const messages = {
notTheBlogOwner: 'You are not the site owner.'
};
module.exports = {
updateSetup(apiConfig, frame) {
debug('resetPassword');
if (!frame.options.context || !frame.options.context.user) {
throw new errors.NoPermissionError({message: tpl(messages.notTheBlogOwner)});
}
}
};