captcha stats

This commit is contained in:
realaravinth
2021-07-27 15:28:21 +05:30
parent 9bc11f3518
commit 1d759fcb25
18 changed files with 249 additions and 159 deletions

View File

@@ -65,7 +65,10 @@ pub async fn get_config(
match res.exists {
Some(true) => {
match data.captcha.get_pow(payload.key.clone()).await {
Some(config) => Ok(HttpResponse::Ok().json(config)),
Some(config) => {
record_fetch(&payload.key, &data.db).await;
Ok(HttpResponse::Ok().json(config))
}
None => {
init_mcaptcha(&data, &payload.key).await?;
let config = data