captcha stats

This commit is contained in:
realaravinth
2021-05-27 14:47:29 +05:30
parent df89938f2a
commit fcdbe66b26
28 changed files with 412 additions and 122 deletions

View File

@@ -29,7 +29,7 @@ pub struct Email {
pub email: String,
}
#[my_codegen::post(path="crate::V1_API_ROUTES.account.email_exists")]
#[my_codegen::post(path = "crate::V1_API_ROUTES.account.email_exists")]
pub async fn email_exists(
payload: web::Json<AccountCheckPayload>,
data: web::Data<Data>,
@@ -53,7 +53,10 @@ pub async fn email_exists(
}
/// update email
#[my_codegen::post(path="crate::V1_API_ROUTES.account.update_email", wrap="crate::CheckLogin")]
#[my_codegen::post(
path = "crate::V1_API_ROUTES.account.update_email",
wrap = "crate::CheckLogin"
)]
async fn set_email(
id: Identity,
payload: web::Json<Email>,
@@ -88,20 +91,20 @@ async fn set_email(
pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
cfg.service(email_exists);
cfg.service(set_email);
// use crate::define_resource;
// use crate::V1_API_ROUTES;
//
// define_resource!(
// cfg,
// V1_API_ROUTES.account.email_exists,
// Methods::Post,
// email_exists
// );
//
// define_resource!(
// cfg,
// V1_API_ROUTES.account.update_email,
// Methods::Post,
// set_email
// );
// use crate::define_resource;
// use crate::V1_API_ROUTES;
//
// define_resource!(
// cfg,
// V1_API_ROUTES.account.email_exists,
// Methods::Post,
// email_exists
// );
//
// define_resource!(
// cfg,
// V1_API_ROUTES.account.update_email,
// Methods::Post,
// set_email
// );
}