User middleware, fix #54

This commit is contained in:
Lennart
2025-04-12 13:12:48 +02:00
parent 6369fb3542
commit 30b0bf5b56
2 changed files with 15 additions and 9 deletions

View File

@@ -33,7 +33,7 @@ pub async fn route_post_login<AP: AuthenticationProvider>(
.validate_user_token(&form.username, &form.password)
.await
{
session.insert("user", user).unwrap();
session.insert("user", user.id).unwrap();
Redirect::to(format!("/frontend/user/{}", &form.username))
.see_other()
.respond_to(&req)