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

@@ -45,7 +45,7 @@ impl IndexPage {
)]
pub async fn list_sitekeys(data: AppData, id: Identity) -> PageResult<impl Responder> {
let username = id.identity().unwrap();
let res = data.dblib.get_all_user_captchas(&username).await?;
let res = data.db.get_all_user_captchas(&username).await?;
let body = IndexPage::new(res).render_once().unwrap();
Ok(HttpResponse::Ok()
.content_type("text/html; charset=utf-8")