mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/setup.js (#13534)
refs: TryGhost#13380 - The i18n package is deprecated. It is being replaced with the tpl package.
This commit is contained in:
parent
91dd9eae4e
commit
4f0999b6db
@ -1,13 +1,17 @@
|
|||||||
const debug = require('@tryghost/debug')('api:v3:utils:validators:input:updateSetup');
|
const debug = require('@tryghost/debug')('api:v3:utils:validators:input:updateSetup');
|
||||||
const i18n = require('../../../../../../shared/i18n');
|
const tpl = require('@tryghost/tpl');
|
||||||
const errors = require('@tryghost/errors');
|
const errors = require('@tryghost/errors');
|
||||||
|
|
||||||
|
const messages = {
|
||||||
|
notTheBlogOwner: 'You are not the site owner.'
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
updateSetup(apiConfig, frame) {
|
updateSetup(apiConfig, frame) {
|
||||||
debug('resetPassword');
|
debug('resetPassword');
|
||||||
|
|
||||||
if (!frame.options.context || !frame.options.context.user) {
|
if (!frame.options.context || !frame.options.context.user) {
|
||||||
throw new errors.NoPermissionError({message: i18n.t('errors.api.authentication.notTheBlogOwner')});
|
throw new errors.NoPermissionError({message: tpl(messages.notTheBlogOwner)});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user