mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
show password compoenent
This commit is contained in:
@@ -27,6 +27,8 @@ use crate::errors::*;
|
||||
use crate::Data;
|
||||
use crate::*;
|
||||
|
||||
pub const AUTH: routes::Auth = routes::Auth::new();
|
||||
|
||||
pub mod routes {
|
||||
pub struct Auth {
|
||||
pub login: &'static str,
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
use actix_web::{HttpResponse, Responder};
|
||||
use lazy_static::lazy_static;
|
||||
use sailfish::TemplateOnce;
|
||||
use my_codegen::get;
|
||||
use crate::PAGES;
|
||||
|
||||
#[derive(Clone, TemplateOnce)]
|
||||
#[template(path = "auth/login/index.html")]
|
||||
@@ -35,7 +37,11 @@ lazy_static! {
|
||||
static ref INDEX: String = IndexPage::default().render_once().unwrap();
|
||||
}
|
||||
|
||||
const ROUTE: &str = PAGES.auth.login;
|
||||
|
||||
#[get(path="ROUTE")]
|
||||
pub async fn login() -> impl Responder {
|
||||
struct Foo;
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body(&*INDEX)
|
||||
|
||||
@@ -22,7 +22,8 @@ pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
||||
use crate::define_resource;
|
||||
use crate::PAGES;
|
||||
|
||||
define_resource!(cfg, PAGES.auth.login, Methods::Get, login::login);
|
||||
cfg.service(login::login);
|
||||
// define_resource!(cfg, PAGES.auth.login, Methods::Get, login::login);
|
||||
define_resource!(cfg, PAGES.auth.join, Methods::Get, register::join);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user