feat: migrate notifications add, mark_read and get to use db_* traits

This commit is contained in:
realaravinth
2022-05-26 20:03:05 +05:30
parent 44740535c2
commit aad49dbb94
8 changed files with 59 additions and 678 deletions

View File

@@ -173,22 +173,6 @@ async fn update(
data.dblib
.delete_traffic_pattern(&username, &msg.key)
.await?;
// sqlx::query!(
// "DELETE FROM mcaptcha_sitekey_user_provided_avg_traffic
// WHERE config_id = (
// SELECT config_id
// FROM
// mcaptcha_config
// WHERE
// key = ($1)
// AND
// user_id = (SELECT ID FROM mcaptcha_users WHERE name = $2)
// );",
// &msg.key,
// &username,
// )
// .execute(&data.db)
// .await?;
data.dblib
.add_traffic_pattern(&username, &msg.key, &pattern)