This commit is contained in:
parent
f3705b9a0e
commit
ac2c50e567
3 changed files with 10 additions and 1 deletions
|
@ -3,7 +3,7 @@ use actix_web::{middleware::DefaultHeaders, web, App, HttpServer};
|
||||||
use std::io::Result;
|
use std::io::Result;
|
||||||
|
|
||||||
use crate::routes::{
|
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;
|
mod config;
|
||||||
|
@ -44,6 +44,7 @@ async fn main() -> Result<()> {
|
||||||
.service(blog::page)
|
.service(blog::page)
|
||||||
.service(web3::page)
|
.service(web3::page)
|
||||||
.service(gaming::page)
|
.service(gaming::page)
|
||||||
|
.service(cours::page)
|
||||||
.service(Files::new("/", config.static_location.clone()))
|
.service(Files::new("/", config.static_location.clone()))
|
||||||
.default_service(web::to(not_found::page))
|
.default_service(web::to(not_found::page))
|
||||||
})
|
})
|
||||||
|
|
7
src/routes/cours.rs
Normal file
7
src/routes/cours.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
use actix_web::{get, Responder};
|
||||||
|
|
||||||
|
#[get("/cours")]
|
||||||
|
pub async fn page() -> impl Responder {
|
||||||
|
// TODO
|
||||||
|
actix_web::web::Redirect::to("/")
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
pub mod agreements;
|
pub mod agreements;
|
||||||
pub mod blog;
|
pub mod blog;
|
||||||
pub mod contrib;
|
pub mod contrib;
|
||||||
|
pub mod cours;
|
||||||
pub mod gaming;
|
pub mod gaming;
|
||||||
pub mod index;
|
pub mod index;
|
||||||
pub mod networks;
|
pub mod networks;
|
||||||
|
|
Loading…
Reference in a new issue