mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-15 05:32:25 +00:00
frontend: Add button to log out
This commit is contained in:
@@ -54,3 +54,8 @@ pub async fn route_post_login<AP: AuthenticationProvider>(
|
||||
ErrorUnauthorized("Unauthorized").error_response()
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn route_post_logout(req: HttpRequest, session: Session) -> Redirect {
|
||||
session.remove("user");
|
||||
Redirect::to(req.url_for_static("frontend_login").unwrap().to_string()).see_other()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user