Update nickle-jwt-session use.
This commit is contained in:
parent
5e8ce70293
commit
583f492cae
@ -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 = "*"
|
||||
|
@ -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("/")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user