Better deprecation warning for old language route

This commit is contained in:
Peter Jaszkowiak
2017-02-01 10:36:15 -07:00
parent 975f2a669d
commit bf44ca20f2

View File

@@ -152,7 +152,7 @@ module.exports = function (app, middleware, hotswapIds) {
// DEPRECATED
app.use(relativePath + '/api/language', function (req, res) {
winston.warn('[deprecated] Accessing language files from `/api/language` is deprecated. ' +
'Use `/assets/language/[langCode]/[namespace].json` for prefetch paths.');
'Use `/assets/language' + req.path + '.json` for prefetch paths.');
res.redirect(relativePath + '/assets/language' + req.path + '.json?' + meta.config['cache-buster']);
});