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/tests/http.rs b/backend/tests/http.rs index 9d31fb6..11287bc 100644 --- a/backend/tests/http.rs +++ b/backend/tests/http.rs @@ -219,8 +219,7 @@ async fn sign_in() -> Result<(), Box> { response.assert_status_see_other(); // Redirection after successful sign in. response.assert_text(""); // English is the default language. - response.assert_header("location", "/en/?user_message=16&user_message_icon=0"); - dbg!(&response); + response.assert_header("location", "/?user_message=16&user_message_icon=0"); Ok(()) }