mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-12 10:35:39 +00:00
using custom version of actix-codegen and cors for pow routes
This commit is contained in:
@@ -37,11 +37,8 @@ lazy_static! {
|
||||
static ref INDEX: String = IndexPage::default().render_once().unwrap();
|
||||
}
|
||||
|
||||
const ROUTE: &str = PAGES.auth.login;
|
||||
|
||||
#[get(path="ROUTE")]
|
||||
#[get(path="PAGES.auth.login")]
|
||||
pub async fn login() -> impl Responder {
|
||||
struct Foo;
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body(&*INDEX)
|
||||
|
||||
@@ -19,12 +19,8 @@ pub mod login;
|
||||
pub mod register;
|
||||
|
||||
pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
||||
use crate::define_resource;
|
||||
use crate::PAGES;
|
||||
|
||||
cfg.service(login::login);
|
||||
// define_resource!(cfg, PAGES.auth.login, Methods::Get, login::login);
|
||||
define_resource!(cfg, PAGES.auth.join, Methods::Get, register::join);
|
||||
cfg.service(register::join);
|
||||
}
|
||||
|
||||
pub mod routes {
|
||||
|
||||
@@ -35,6 +35,7 @@ lazy_static! {
|
||||
static ref INDEX: String = IndexPage::default().render_once().unwrap();
|
||||
}
|
||||
|
||||
#[my_codegen::get(path = "crate::PAGES.auth.join")]
|
||||
pub async fn join() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
|
||||
Reference in New Issue
Block a user