Update nickle-jwt-session use.

This commit is contained in:
Rasmus Kaj 2016-09-20 07:35:01 +02:00
parent 5e8ce70293
commit 583f492cae
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ path = "src/setpassword.rs"
[dependencies]
nickel = ">= 0.8.1"
nickel-jwt-session = "*"
nickel-jwt-session = "^0.4"
env_logger = "*"
log = "*"
chrono = "*"

View File

@ -152,7 +152,7 @@ fn main() {
fn login<'mw>(_req: &mut Request,
mut res: Response<'mw>)
-> MiddlewareResult<'mw> {
res.clear_jwt_user();
res.clear_jwt();
render!(res, "templates/login.tpl", {})
}
@ -184,7 +184,7 @@ fn do_login<'mw>(req: &mut Request,
fn logout<'mw>(_req: &mut Request,
mut res: Response<'mw>)
-> MiddlewareResult<'mw> {
res.clear_jwt_user();
res.clear_jwt();
res.redirect("/")
}