handle withdraw/revive qr code actions

This commit is contained in:
B. Petersen
2021-06-23 14:28:25 +02:00
committed by bjoern
parent 3f00a6efbe
commit 8ac2bd0298
4 changed files with 97 additions and 2 deletions

View File

@@ -111,3 +111,14 @@ pub async fn exists(context: &Context, namespace: Namespace, token: &str) -> boo
.await
.unwrap_or_default()
}
pub async fn delete(context: &Context, namespace: Namespace, token: &str) -> Result<()> {
context
.sql
.execute(
"DELETE FROM tokens WHERE namespc=? AND token=?;",
paramsv![namespace, token],
)
.await?;
Ok(())
}