Compare commits
3 commits
2a93456350
...
deb6b8649e
| Author | SHA1 | Date | |
|---|---|---|---|
| deb6b8649e | |||
| 79c6b01c12 | |||
| a175595e23 |
2 changed files with 3 additions and 8 deletions
|
|
@ -368,8 +368,7 @@ pub async fn sign_in_post(
|
||||||
Ok((
|
Ok((
|
||||||
jar.add(cookie),
|
jar.add(cookie),
|
||||||
Redirect::to(&format!(
|
Redirect::to(&format!(
|
||||||
"/{}/?{}={}&{}={}",
|
"/?{}={}&{}={}",
|
||||||
context.tr.current_lang_code(),
|
|
||||||
common::consts::GET_PARAMETER_USER_MESSAGE,
|
common::consts::GET_PARAMETER_USER_MESSAGE,
|
||||||
Sentence::SignInSuccess as i64,
|
Sentence::SignInSuccess as i64,
|
||||||
common::consts::GET_PARAMETER_USER_MESSAGE_LEVEL,
|
common::consts::GET_PARAMETER_USER_MESSAGE_LEVEL,
|
||||||
|
|
@ -395,10 +394,7 @@ pub async fn sign_out(
|
||||||
jar = jar.remove(consts::COOKIE_AUTH_TOKEN_NAME);
|
jar = jar.remove(consts::COOKIE_AUTH_TOKEN_NAME);
|
||||||
connection.sign_out(&token).await?;
|
connection.sign_out(&token).await?;
|
||||||
}
|
}
|
||||||
Ok((
|
Ok((jar, Redirect::to("/")))
|
||||||
jar,
|
|
||||||
Redirect::to(&format!("/{}/", context.tr.current_lang_code())),
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// RESET PASSWORD ///
|
/// RESET PASSWORD ///
|
||||||
|
|
|
||||||
|
|
@ -219,8 +219,7 @@ async fn sign_in() -> Result<(), Box<dyn Error>> {
|
||||||
response.assert_status_see_other(); // Redirection after successful sign in.
|
response.assert_status_see_other(); // Redirection after successful sign in.
|
||||||
response.assert_text("");
|
response.assert_text("");
|
||||||
// English is the default language.
|
// English is the default language.
|
||||||
response.assert_header("location", "/en/?user_message=16&user_message_icon=0");
|
response.assert_header("location", "/?user_message=16&user_message_icon=0");
|
||||||
dbg!(&response);
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue