1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fixing language switching error

This commit is contained in:
Patrik J. Braun 2019-01-02 21:21:20 +01:00
parent 08d8a8eeb8
commit 92c27cee9b
2 changed files with 3 additions and 2 deletions

View File

@ -64,7 +64,8 @@ export class RenderingMWs {
if (err instanceof ErrorDTO) {
if (err.details) {
Logger.warn('Handled error:', err);
Logger.warn('Handled error:');
console.log(err);
if (!(req.session.user && req.session.user.role >= UserRoles.Developer)) {
delete (err.details);
} else {

View File

@ -36,7 +36,7 @@ export class PublicRouter {
}
}
if (selectedLocale !== 'en') {
localePath = req['locale'];
localePath = selectedLocale;
}
res.cookie(CookieNames.lang, selectedLocale);
req['localePath'] = localePath;