mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
refactored sitekey routes
This commit is contained in:
@@ -37,6 +37,12 @@ lazy_static! {
|
||||
static ref INDEX: String = IndexPage::default().render_once().unwrap();
|
||||
}
|
||||
|
||||
async fn panel() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body(&*INDEX)
|
||||
}
|
||||
|
||||
pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
||||
use crate::define_resource;
|
||||
use crate::PAGES;
|
||||
@@ -45,12 +51,6 @@ pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
||||
sitekey::services(cfg);
|
||||
}
|
||||
|
||||
async fn panel() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body(&*INDEX)
|
||||
}
|
||||
|
||||
pub mod routes {
|
||||
use super::sitekey::routes::Sitekey;
|
||||
pub struct Panel {
|
||||
|
||||
@@ -26,7 +26,7 @@ lazy_static! {
|
||||
}
|
||||
|
||||
#[derive(TemplateOnce, Clone)]
|
||||
#[template(path = "panel/add-site-key/index.html")]
|
||||
#[template(path = "panel/sitekey/add/index.html")]
|
||||
pub struct IndexPage<'a> {
|
||||
pub levels: usize,
|
||||
pub form_title: &'a str,
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::errors::*;
|
||||
use crate::Data;
|
||||
|
||||
#[derive(TemplateOnce, Clone)]
|
||||
#[template(path = "panel/site-keys/index.html")]
|
||||
#[template(path = "panel/sitekey/list/index.html")]
|
||||
pub struct IndexPage {
|
||||
sitekeys: SiteKeys,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user