redis storage for captcha mech

This commit is contained in:
realaravinth
2021-06-11 19:31:03 +05:30
parent 17ae532162
commit f5624947b9
29 changed files with 604 additions and 210 deletions

View File

@@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize};
use crate::api::v1::mcaptcha::mcaptcha::MCaptchaDetails;
use crate::errors::*;
use crate::Data;
use crate::AppData;
pub mod routes {
pub struct Duration {
@@ -50,7 +50,7 @@ pub struct UpdateDuration {
)]
async fn update_duration(
payload: web::Json<UpdateDuration>,
data: web::Data<Data>,
data: AppData,
id: Identity,
) -> ServiceResult<impl Responder> {
let username = id.identity().unwrap();
@@ -91,7 +91,7 @@ pub struct GetDuration {
)]
async fn get_duration(
payload: web::Json<MCaptchaDetails>,
data: web::Data<Data>,
data: AppData,
id: Identity,
) -> ServiceResult<impl Responder> {
let username = id.identity().unwrap();