session check

This commit is contained in:
Mateusz Gruszczyński
2026-07-26 09:36:23 +02:00
parent e3abc3e7be
commit 5f93d3642b
4 changed files with 58 additions and 4 deletions
+1
View File
@@ -23,6 +23,7 @@ pub const AUTH_USER_BY_EXTERNAL_ID: &str = "SELECT id, nickname, email, password
pub const AUTH_DELETE_USER: &str = "DELETE FROM users WHERE id = ?";
pub const AUTH_SESSION_EXPIRES_AT: &str = "SELECT expires_at FROM user_sessions WHERE token = ?";
pub const AUTH_DELETE_SESSION_BY_TOKEN: &str = "DELETE FROM user_sessions WHERE token = ?";
pub const AUTH_REFRESH_SESSION: &str = "UPDATE user_sessions SET expires_at = ? WHERE token = ? AND expires_at > ?";
pub const AUTH_DELETE_CONFIRMATION_TOKENS_BY_USER: &str =
"DELETE FROM account_confirmation_tokens WHERE user_id = ?";
pub const AUTH_INSERT_CONFIRMATION_TOKEN: &str =