diff --git a/src/main.rs b/src/main.rs index 2601a42..5e46757 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use actix_web::{middleware::DefaultHeaders, web, App, HttpServer}; use std::io::Result; use crate::routes::{ - agreements, blog, contrib, gaming, index, networks, not_found, portfolio, web3, + agreements, blog, contrib, cours, gaming, index, networks, not_found, portfolio, web3, }; mod config; @@ -44,6 +44,7 @@ async fn main() -> Result<()> { .service(blog::page) .service(web3::page) .service(gaming::page) + .service(cours::page) .service(Files::new("/", config.static_location.clone())) .default_service(web::to(not_found::page)) }) diff --git a/src/routes/cours.rs b/src/routes/cours.rs new file mode 100644 index 0000000..f43ea62 --- /dev/null +++ b/src/routes/cours.rs @@ -0,0 +1,7 @@ +use actix_web::{get, Responder}; + +#[get("/cours")] +pub async fn page() -> impl Responder { + // TODO + actix_web::web::Redirect::to("/") +} diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 86684db..be59f31 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,6 +1,7 @@ pub mod agreements; pub mod blog; pub mod contrib; +pub mod cours; pub mod gaming; pub mod index; pub mod networks;