#
mcaptcha/pages/auth/
register.rs

    1// Copyright (C) 2022  Aravinth Manivannan <realaravinth@batsense.net>
    2// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
    3//
    4// SPDX-License-Identifier: AGPL-3.0-or-later
    5
    6use 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}