0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Replaced i18n.t w/ tpl in api/v2/utils/validators/input/setup.js (#13579)

refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
This commit is contained in:
IncredibleZuess 2021-10-13 09:54:22 +02:00 committed by GitHub
parent b2e4145bd9
commit dd5a96d37c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,17 @@
const debug = require('@tryghost/debug')('api:v2:utils:validators:input:updateSetup');
const i18n = require('../../../../../../shared/i18n');
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: i18n.t('errors.api.authentication.notTheBlogOwner')});
throw new errors.NoPermissionError({message: tpl(messages.notTheBlogOwner)});
}
}
};