Resolve some TODOs

This commit is contained in:
2025-03-20 21:00:29 +01:00
parent 133d0de084
commit c6757f477a
3 changed files with 8 additions and 6 deletions

View File

@ -100,7 +100,7 @@ pub async fn delete(user_id: UserID, token_id: TokenID) -> anyhow::Result<()> {
/// Remove outdated token
pub async fn cleanup() -> anyhow::Result<()> {
let query = format!(
"DELETE from token where last_used + max_inactivity < {};",
"DELETE from token where time_used + max_inactivity < {};",
time()
);
diesel::sql_query(query).execute(&mut db()?)?;