feat: migrate fetching stats to use db_*

This commit is contained in:
realaravinth
2022-05-27 17:09:27 +05:30
parent bc90a51d30
commit 098d0cfc24
10 changed files with 50 additions and 299 deletions

View File

@@ -42,7 +42,7 @@ pub async fn verify_pow(
) -> ServiceResult<impl Responder> {
let key = payload.key.clone();
let res = data.captcha.verify_pow(payload.into_inner()).await?;
data.stats.record_solve(&data, &key).await;
data.stats.record_solve(&data, &key).await?;
let payload = ValidationToken { token: res };
Ok(HttpResponse::Ok().json(payload))
}