mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 19:11:22 +01:00
Better deprecation warning for old language route
This commit is contained in:
@@ -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']);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user