add timezone to session expiration

This commit is contained in:
Hamcha 2023-07-21 10:01:13 +02:00
parent 350a779f9c
commit 38debc2554
Signed by: hamcha
GPG Key ID: 1669C533B8CF6D89
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ async fn login<Repo: UserRepository + SessionRepository>(
let token = session.token();
let mut response: Response =
Json(json!({ "session_token": token, "expires_at": session.expires_at })).into_response();
Json(json!({ "session_token": token, "expires_at": session.expires_at.and_utc() }))
.into_response();
response.headers_mut().insert(
SET_COOKIE,