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

@@ -35,7 +35,7 @@ pub async fn get_captcha(
) -> ServiceResult<impl Responder> {
let username = id.identity().unwrap();
let levels = data
.dblib
.db
.get_captcha_levels(Some(&username), &payload.key)
.await?;
Ok(HttpResponse::Ok().json(levels))