mirror of https://github.com/rwf2/Rocket.git
Fix examples for updates Redirect API.
This commit is contained in:
parent
dd030334e4
commit
5b8b41bcd8
|
@ -63,7 +63,7 @@ fn login<'a>(user_form: Form<'a, UserLogin<'a>>) -> Result<Redirect, String> {
|
||||||
|
|
||||||
if user.username == "Sergio" {
|
if user.username == "Sergio" {
|
||||||
if let Ok(StrongPassword("password")) = user.password {
|
if let Ok(StrongPassword("password")) = user.password {
|
||||||
Ok(Redirect::other("/user/Sergio"))
|
Ok(Redirect::to("/user/Sergio"))
|
||||||
} else {
|
} else {
|
||||||
Err("Wrong password!".to_string())
|
Err("Wrong password!".to_string())
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ fn login<'a>(user_form: Form<'a, UserLogin<'a>>) -> Result<Redirect, String> {
|
||||||
|
|
||||||
if user.username == "Sergio" {
|
if user.username == "Sergio" {
|
||||||
match user.password {
|
match user.password {
|
||||||
"password" => Ok(Redirect::other("/user/Sergio")),
|
"password" => Ok(Redirect::to("/user/Sergio")),
|
||||||
_ => Err("Wrong password!".to_string())
|
_ => Err("Wrong password!".to_string())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue