mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-13 02:55:39 +00:00
chore: get rid of direct DB init and use db_*
This commit is contained in:
@@ -33,7 +33,7 @@ pub async fn email_exists(
|
||||
payload: web::Json<AccountCheckPayload>,
|
||||
data: AppData,
|
||||
) -> ServiceResult<impl Responder> {
|
||||
let exists = data.dblib.email_exists(&payload.val).await?;
|
||||
let exists = data.db.email_exists(&payload.val).await?;
|
||||
|
||||
let resp = AccountCheckResp { exists };
|
||||
|
||||
@@ -59,7 +59,7 @@ async fn set_email(
|
||||
new_email: &payload.email,
|
||||
};
|
||||
|
||||
data.dblib.update_email(&update_email).await?;
|
||||
data.db.update_email(&update_email).await?;
|
||||
|
||||
Ok(HttpResponse::Ok())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user