add cours endpoint
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-04-16 13:18:15 +02:00
parent f3705b9a0e
commit ac2c50e567
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 10 additions and 1 deletions

View file

@ -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))
})

7
src/routes/cours.rs Normal file
View file

@ -0,0 +1,7 @@
use actix_web::{get, Responder};
#[get("/cours")]
pub async fn page() -> impl Responder {
// TODO
actix_web::web::Redirect::to("/")
}

View file

@ -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;