Fix compilation errors: Restore missing delete_session method and ApiDoc struct
All checks were successful
Build MIPS Binary / build (push) Successful in 4m7s

This commit is contained in:
spinline
2026-02-07 19:28:47 +03:00
parent edfb7458f8
commit 858a1c9b63
2 changed files with 99 additions and 1 deletions

View File

@@ -104,6 +104,14 @@ impl Db {
Ok(row.map(|r| r.get(0)))
}
pub async fn delete_session(&self, token: &str) -> Result<()> {
sqlx::query("DELETE FROM sessions WHERE token = ?")
.bind(token)
.execute(&self.pool)
.await?;
Ok(())
}
pub async fn update_password(&self, user_id: i64, password_hash: &str) -> Result<()> {
sqlx::query("UPDATE users SET password_hash = ? WHERE id = ?")
.bind(password_hash)