Skip to content

Commit

Permalink
fix: add de in user_controller lang check
Browse files Browse the repository at this point in the history
  • Loading branch information
rschlaefli committed Sep 24, 2023
1 parent 782844f commit 3e27931
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/user_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ exports.update = (req, res, next) => {
user.gender = body.gender;
let scs = i18n.common.flash.successEditingUser;

if (body.lang === "es" || body.lang === "en") {
if (["en", "es", "de"].includes(body.lang)) {
user.lang = body.lang;
if (req.cookies && req.cookies.locale && (user.lang !== body.lang || req.cookies.locale !== body.lang)) {
res.cookie("locale", body.lang);
Expand Down
File renamed without changes.

0 comments on commit 3e27931

Please sign in to comment.