diff --git a/core/server/api/v3/preview.js b/core/server/api/v3/preview.js index 758977fcc2..bd45cc6d19 100644 --- a/core/server/api/v3/preview.js +++ b/core/server/api/v3/preview.js @@ -1,8 +1,10 @@ -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); const models = require('../../models'); const ALLOWED_INCLUDES = ['authors', 'tags']; - +const messages = { + postNotFound: 'Post not found.' +}; module.exports = { docName: 'preview', @@ -31,7 +33,7 @@ module.exports = { .then((model) => { if (!model) { throw new errors.NotFoundError({ - message: i18n.t('errors.api.posts.postNotFound') + message: tpl(messages.postNotFound) }); }