chore: get rid of direct DB init and use db_*

This commit is contained in:
realaravinth
2022-05-27 18:25:27 +05:30
parent cd72ae6ffe
commit d7fd23f565
25 changed files with 55 additions and 63 deletions

View File

@@ -81,13 +81,13 @@ pub mod runner {
duration,
};
match data.dblib.create_captcha(username, &p).await {
match data.db.create_captcha(username, &p).await {
Ok(_) => break,
Err(DBError::SecretTaken) => continue,
Err(e) => return Err(e.into()),
}
}
data.dblib
data.db
.add_captcha_levels(username, &key, &payload.levels)
.await?;
let mcaptcha_config = MCaptchaDetails {