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:
parent
08d8a8eeb8
commit
92c27cee9b
@ -64,7 +64,8 @@ export class RenderingMWs {
|
|||||||
|
|
||||||
if (err instanceof ErrorDTO) {
|
if (err instanceof ErrorDTO) {
|
||||||
if (err.details) {
|
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)) {
|
if (!(req.session.user && req.session.user.role >= UserRoles.Developer)) {
|
||||||
delete (err.details);
|
delete (err.details);
|
||||||
} else {
|
} else {
|
||||||
|
@ -36,7 +36,7 @@ export class PublicRouter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (selectedLocale !== 'en') {
|
if (selectedLocale !== 'en') {
|
||||||
localePath = req['locale'];
|
localePath = selectedLocale;
|
||||||
}
|
}
|
||||||
res.cookie(CookieNames.lang, selectedLocale);
|
res.cookie(CookieNames.lang, selectedLocale);
|
||||||
req['localePath'] = localePath;
|
req['localePath'] = localePath;
|
||||||
|
Loading…
Reference in New Issue
Block a user