diff --git a/core/server/web/api/v3/admin/middleware.js b/core/server/web/api/v3/admin/middleware.js index 0b64dab04f..c7a277659a 100644 --- a/core/server/web/api/v3/admin/middleware.js +++ b/core/server/web/api/v3/admin/middleware.js @@ -1,9 +1,13 @@ const errors = require('@tryghost/errors'); -const i18n = require('../../../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const auth = require('../../../../services/auth'); const shared = require('../../../shared'); const apiMw = require('../../middleware'); +const messages = { + notImplemented: 'The server does not support the functionality required to fulfill the request.' +}; + const notImplemented = function (req, res, next) { // CASE: user is logged in, allow if (!req.api_key) { @@ -42,7 +46,7 @@ const notImplemented = function (req, res, next) { next(new errors.GhostError({ errorType: 'NotImplementedError', - message: i18n.t('errors.api.common.notImplemented'), + message: tpl(messages.notImplemented), statusCode: '501' })); };