diff --git a/src/users.rs b/src/users.rs index ae31742..0c3f91e 100644 --- a/src/users.rs +++ b/src/users.rs @@ -110,10 +110,12 @@ async fn logout(req: HttpRequest, app_state: Data) -> impl Responder { ); match token { Ok(token) => { + let exp = token.claims.exp as i64; if query!( - "INSERT INTO revoked ( token_id, user_id ) VALUES ( $1, $2 )", + "INSERT INTO revoked ( token_id, user_id, expires ) VALUES ( $1, $2, $3 )", token.claims.kid, - token.claims.uid + token.claims.uid, + exp ) .execute(&app_state.database) .await