feat: migrate account deletion to use db_* interface

This commit is contained in:
realaravinth
2022-05-11 12:31:31 +05:30
parent 5dc818a1c1
commit 9f91854c4d
3 changed files with 32 additions and 5 deletions

View File

@@ -64,9 +64,7 @@ pub mod runners {
use super::*;
pub async fn delete_user(name: &str, data: &AppData) -> ServiceResult<()> {
sqlx::query!("DELETE FROM mcaptcha_users WHERE name = ($1)", name,)
.execute(&data.db)
.await?;
data.dblib.delete_user(name).await?;
Ok(())
}
}