From a175595e230d33475c2cd639bf03a806e650286b Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Wed, 7 May 2025 15:51:19 +0200 Subject: [PATCH] - Do not force the language in the url when sign in (to use the user language preference). - Do not force the language in the url when sign out to use the cookie or Accept-Language settings --- backend/src/services/user.rs | 8 ++------ backend/templates/title.html | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/backend/src/services/user.rs b/backend/src/services/user.rs index 89a51c5..4b295ec 100644 --- a/backend/src/services/user.rs +++ b/backend/src/services/user.rs @@ -368,8 +368,7 @@ pub async fn sign_in_post( Ok(( jar.add(cookie), Redirect::to(&format!( - "/{}/?{}={}&{}={}", - context.tr.current_lang_code(), + "/?{}={}&{}={}", common::consts::GET_PARAMETER_USER_MESSAGE, Sentence::SignInSuccess as i64, common::consts::GET_PARAMETER_USER_MESSAGE_LEVEL, @@ -395,10 +394,7 @@ pub async fn sign_out( jar = jar.remove(consts::COOKIE_AUTH_TOKEN_NAME); connection.sign_out(&token).await?; } - Ok(( - jar, - Redirect::to(&format!("/{}/", context.tr.current_lang_code())), - )) + Ok((jar, Redirect::to("/"))) } /// RESET PASSWORD /// diff --git a/backend/templates/title.html b/backend/templates/title.html index 67ec663..720e9c3 100644 --- a/backend/templates/title.html +++ b/backend/templates/title.html @@ -1,4 +1,4 @@ -