mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 18:15:39 +00:00
captcha stats
This commit is contained in:
@@ -44,7 +44,10 @@ pub struct UpdateDuration {
|
||||
pub duration: i32,
|
||||
}
|
||||
|
||||
#[my_codegen::post(path="crate::V1_API_ROUTES.duration.update", wrap="crate::CheckLogin")]
|
||||
#[my_codegen::post(
|
||||
path = "crate::V1_API_ROUTES.duration.update",
|
||||
wrap = "crate::CheckLogin"
|
||||
)]
|
||||
async fn update_duration(
|
||||
payload: web::Json<UpdateDuration>,
|
||||
data: web::Data<Data>,
|
||||
@@ -82,7 +85,10 @@ pub struct GetDuration {
|
||||
pub token: String,
|
||||
}
|
||||
|
||||
#[my_codegen::post(path="crate::V1_API_ROUTES.duration.get", wrap="crate::CheckLogin")]
|
||||
#[my_codegen::post(
|
||||
path = "crate::V1_API_ROUTES.duration.get",
|
||||
wrap = "crate::CheckLogin"
|
||||
)]
|
||||
async fn get_duration(
|
||||
payload: web::Json<MCaptchaDetails>,
|
||||
data: web::Data<Data>,
|
||||
@@ -105,21 +111,21 @@ async fn get_duration(
|
||||
pub fn services(cfg: &mut web::ServiceConfig) {
|
||||
cfg.service(get_duration);
|
||||
cfg.service(update_duration);
|
||||
// use crate::define_resource;
|
||||
// use crate::V1_API_ROUTES;
|
||||
//
|
||||
// define_resource!(
|
||||
// cfg,
|
||||
// V1_API_ROUTES.duration.get,
|
||||
// Methods::ProtectPost,
|
||||
// get_duration
|
||||
// );
|
||||
// define_resource!(
|
||||
// cfg,
|
||||
// V1_API_ROUTES.duration.update,
|
||||
// Methods::ProtectPost,
|
||||
// update_duration
|
||||
// );
|
||||
// use crate::define_resource;
|
||||
// use crate::V1_API_ROUTES;
|
||||
//
|
||||
// define_resource!(
|
||||
// cfg,
|
||||
// V1_API_ROUTES.duration.get,
|
||||
// Methods::ProtectPost,
|
||||
// get_duration
|
||||
// );
|
||||
// define_resource!(
|
||||
// cfg,
|
||||
// V1_API_ROUTES.duration.update,
|
||||
// Methods::ProtectPost,
|
||||
// update_duration
|
||||
// );
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user