mcaptcha/pages/auth/
register.rs1use actix_web::{HttpResponse, Responder};
7use lazy_static::lazy_static;
8use sailfish::TemplateOnce;
9
10#[derive(Clone, TemplateOnce)]
11#[template(path = "auth/register/index.html")]
12struct IndexPage;
13
14const PAGE: &str = "Join";
15
16impl Default for IndexPage {
17 fn default() -> Self {
18 IndexPage
19 }
20}
21
22lazy_static! {
23 static ref INDEX: String = IndexPage.render_once().unwrap();
24}
25
26#[my_codegen::get(path = "crate::PAGES.auth.join")]
27pub async fn join() -> impl Responder {
28 HttpResponse::Ok()
29 .content_type("text/html; charset=utf-8")
30 .body(&**INDEX)
31}