remove empty structs
This commit is contained in:
parent
22b68f549e
commit
2ca24f020e
4 changed files with 4 additions and 22 deletions
|
@ -1,6 +1,5 @@
|
|||
use actix_web::{get, web, HttpResponse, Responder};
|
||||
use cached::proc_macro::once;
|
||||
use ramhorns::Content;
|
||||
|
||||
use crate::{config::Config, template::Infos};
|
||||
|
||||
|
@ -9,14 +8,11 @@ pub async fn page(config: web::Data<Config>) -> impl Responder {
|
|||
HttpResponse::Ok().body(build_page(config.get_ref().clone()))
|
||||
}
|
||||
|
||||
#[derive(Content)]
|
||||
struct IndexTemplate {}
|
||||
|
||||
#[once(time = 60)]
|
||||
pub fn build_page(config: Config) -> String {
|
||||
config.tmpl.render(
|
||||
"index.html",
|
||||
IndexTemplate {},
|
||||
(),
|
||||
Infos {
|
||||
page_title: Some("Mylloon".to_owned()),
|
||||
page_desc: Some("Page principale".to_owned()),
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use actix_web::{get, web, HttpResponse, Responder};
|
||||
use cached::proc_macro::once;
|
||||
use ramhorns::Content;
|
||||
|
||||
use crate::{config::Config, template::Infos};
|
||||
|
||||
|
@ -9,14 +8,11 @@ pub async fn page(config: web::Data<Config>) -> impl Responder {
|
|||
HttpResponse::Ok().body(build_page(config.get_ref().clone()))
|
||||
}
|
||||
|
||||
#[derive(Content)]
|
||||
struct NetworksTemplate {}
|
||||
|
||||
#[once(time = 60)]
|
||||
pub fn build_page(config: Config) -> String {
|
||||
config.tmpl.render(
|
||||
"networks.html",
|
||||
NetworksTemplate {},
|
||||
(),
|
||||
Infos {
|
||||
page_title: Some("Mes réseaux".to_owned()),
|
||||
page_desc: Some("Réseaux d'Anri".to_owned()),
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use actix_web::{web, HttpResponse, Responder};
|
||||
use cached::proc_macro::once;
|
||||
use ramhorns::Content;
|
||||
|
||||
use crate::{config::Config, template::Infos};
|
||||
|
||||
|
@ -8,12 +7,7 @@ pub async fn page(config: web::Data<Config>) -> impl Responder {
|
|||
HttpResponse::NotFound().body(build_page(config.get_ref().clone()))
|
||||
}
|
||||
|
||||
#[derive(Content)]
|
||||
struct Error404Template {}
|
||||
|
||||
#[once(time = 60)]
|
||||
pub fn build_page(config: Config) -> String {
|
||||
config
|
||||
.tmpl
|
||||
.render("404.html", Error404Template {}, Infos::default())
|
||||
config.tmpl.render("404.html", (), Infos::default())
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use actix_web::{get, web, HttpResponse, Responder};
|
||||
use cached::proc_macro::once;
|
||||
use ramhorns::Content;
|
||||
|
||||
use crate::{config::Config, template::Infos};
|
||||
|
||||
|
@ -9,14 +8,11 @@ pub async fn page(config: web::Data<Config>) -> impl Responder {
|
|||
HttpResponse::Ok().body(build_page(config.get_ref().clone()))
|
||||
}
|
||||
|
||||
#[derive(Content)]
|
||||
struct Web3Template {}
|
||||
|
||||
#[once(time = 60)]
|
||||
pub fn build_page(config: Config) -> String {
|
||||
config.tmpl.render(
|
||||
"web3.html",
|
||||
Web3Template {},
|
||||
(),
|
||||
Infos {
|
||||
page_title: Some("Mylloon".to_owned()),
|
||||
page_desc: Some("Coin reculé de l'internet".to_owned()),
|
||||
|
|
Loading…
Reference in a new issue