mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
* fix: #7038, autoLocale logic not playing nicely with no-refresh auths - on login, req.query.lang is deleted (since it seems to be left over) - on logout, the middleware.autoLocale is executed, which resets req.query.lang - middleware.autoLocale is new, just refactored existing logic in webserver.js into new middleware method. * style: tests, use lodash * fix: timeago strings not switching languages on login or out
This commit is contained in:
@@ -284,6 +284,8 @@ function continueLogin(req, res, next) {
|
||||
});
|
||||
});
|
||||
} else {
|
||||
delete req.query.lang;
|
||||
|
||||
async.parallel({
|
||||
doLogin: async.apply(authenticationController.doLogin, req, userData.uid),
|
||||
header: async.apply(middleware.generateHeader, req, res, {}),
|
||||
|
||||
Reference in New Issue
Block a user