mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
show password component
This commit is contained in:
@@ -25,6 +25,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::mcaptcha::get_random;
|
||||
use crate::errors::*;
|
||||
use crate::Data;
|
||||
use crate::*;
|
||||
|
||||
pub mod routes {
|
||||
pub struct Auth {
|
||||
@@ -47,13 +48,17 @@ pub mod routes {
|
||||
}
|
||||
}
|
||||
|
||||
//post!(V1_API_ROUTES.auth.register, signup);
|
||||
pub fn services(cfg: &mut web::ServiceConfig) {
|
||||
use crate::define_resource;
|
||||
use crate::V1_API_ROUTES;
|
||||
|
||||
// protect_get!(cfg, V1_API_ROUTES.auth.logout, signout);
|
||||
|
||||
//cfg.service(signup);
|
||||
|
||||
define_resource!(cfg, V1_API_ROUTES.auth.register, Methods::Post, signup);
|
||||
define_resource!(cfg, V1_API_ROUTES.auth.logout, Methods::ProtectGet, signout);
|
||||
define_resource!(cfg, V1_API_ROUTES.auth.login, Methods::Post, signin);
|
||||
//post!(cfg, V1_API_ROUTES.auth.login, signin);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
use actix_cors::Cors;
|
||||
use actix_web::web;
|
||||
use actix_web::*;
|
||||
|
||||
pub mod get_config;
|
||||
pub mod verify_pow;
|
||||
@@ -68,4 +69,19 @@ pub mod routes {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types, missing_docs)]
|
||||
pub struct post;
|
||||
impl actix_web::dev::HttpServiceFactory for post {
|
||||
fn register(self, __config: &mut actix_web::dev::AppService) {
|
||||
async fn post() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
}
|
||||
let __resource = actix_web::Resource::new("/test/post")
|
||||
.guard(actix_web::guard::Post())
|
||||
.to(post);
|
||||
actix_web::dev::HttpServiceFactory::register(__resource, __config)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user