Fix examples for updates Redirect API.

This commit is contained in:
Sergio Benitez 2016-11-03 19:09:08 +01:00
parent dd030334e4
commit 5b8b41bcd8
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ fn login<'a>(user_form: Form<'a, UserLogin<'a>>) -> Result<Redirect, String> {
if user.username == "Sergio" {
if let Ok(StrongPassword("password")) = user.password {
Ok(Redirect::other("/user/Sergio"))
Ok(Redirect::to("/user/Sergio"))
} else {
Err("Wrong password!".to_string())
}

View File

@ -28,7 +28,7 @@ fn login<'a>(user_form: Form<'a, UserLogin<'a>>) -> Result<Redirect, String> {
if user.username == "Sergio" {
match user.password {
"password" => Ok(Redirect::other("/user/Sergio")),
"password" => Ok(Redirect::to("/user/Sergio")),
_ => Err("Wrong password!".to_string())
}
} else {