mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-13 19:15:39 +00:00
feat: migrate record_stats to use db_*
This commit is contained in:
@@ -21,7 +21,6 @@ use libmcaptcha::pow::Work;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::stats::record::record_solve;
|
||||
use crate::AppData;
|
||||
use crate::V1_API_ROUTES;
|
||||
|
||||
@@ -43,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?;
|
||||
record_solve(&key, &data.db).await;
|
||||
data.stats.record_solve(&data, &key).await;
|
||||
let payload = ValidationToken { token: res };
|
||||
Ok(HttpResponse::Ok().json(payload))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user