add setup page

This commit is contained in:
Mylloon 2023-08-16 10:51:58 +02:00
parent 32797d8f87
commit 307f256997
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 12 additions and 1 deletions

View file

@ -4,7 +4,7 @@ use std::io::Result;
use crate::routes::{ use crate::routes::{
agreements, api_v1, blog, contrib, cours, cv, gaming, index, networks, not_found, portfolio, agreements, api_v1, blog, contrib, cours, cv, gaming, index, networks, not_found, portfolio,
web3, setup, web3,
}; };
mod config; mod config;
@ -49,6 +49,7 @@ async fn main() -> Result<()> {
.service(gaming::page) .service(gaming::page)
.service(cours::page) .service(cours::page)
.service(cv::page) .service(cv::page)
.service(setup::page)
.service(Files::new("/", config.static_location.to_owned())) .service(Files::new("/", config.static_location.to_owned()))
.default_service(web::to(not_found::page)) .default_service(web::to(not_found::page))
}) })

View file

@ -9,4 +9,5 @@ pub mod index;
pub mod networks; pub mod networks;
pub mod not_found; pub mod not_found;
pub mod portfolio; pub mod portfolio;
pub mod setup;
pub mod web3; pub mod web3;

9
src/routes/setup.rs Normal file
View file

@ -0,0 +1,9 @@
use actix_web::{get, Responder};
#[get("/setup")]
pub async fn page() -> impl Responder {
// Explication de l'histoire de par exemple wiki/cat et le follow up
// avec les futures video youtube probablement un shortcut
// vers un billet de blog
actix_web::web::Redirect::to("/")
}