mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Replaced i18n.t w/ tpl helper in scheduler-intergation (#13399)
refs: #13380 The i18n package is deprecated. It is being replaced with the tpl package. Co-authored-by: Kenneth Fitzgerald <fitzgeraldkd@gmail.com>
This commit is contained in:
parent
dedfebfdca
commit
5fb93535f0
1 changed files with 6 additions and 4 deletions
|
@ -1,7 +1,11 @@
|
|||
const models = require('../../../models');
|
||||
const i18n = require('../../../../shared/i18n');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const errors = require('@tryghost/errors');
|
||||
|
||||
const messages = {
|
||||
resourceNotFound: '{resource} not found.'
|
||||
};
|
||||
|
||||
/**
|
||||
* @description Load the internal scheduler integration
|
||||
*
|
||||
|
@ -12,9 +16,7 @@ const getSchedulerIntegration = function () {
|
|||
.then((integration) => {
|
||||
if (!integration) {
|
||||
throw new errors.NotFoundError({
|
||||
message: i18n.t('errors.api.resource.resourceNotFound', {
|
||||
resource: 'Integration'
|
||||
})
|
||||
message: tpl(messages.resourceNotFound, {resource: 'Integration'})
|
||||
});
|
||||
}
|
||||
return integration.toJSON();
|
||||
|
|
Loading…
Reference in a new issue