diff --git a/src/main.rs b/src/main.rs index 342d117..3b8b0f2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,8 +43,12 @@ async fn main() -> Result<()> { .add(("Permissions-Policy", "interest-cohort=()")), ) .service( - web::scope("/api") - .service(web::scope("v1").service(api_v1::love).service(api_v1::btf)), + web::scope("/api").service( + web::scope("v1") + .service(api_v1::love) + .service(api_v1::btf) + .service(api_v1::websites), + ), ) .service(index::page) .service(agreements::security) diff --git a/src/routes/api_v1.rs b/src/routes/api_v1.rs index 22eeeac..3dbf453 100644 --- a/src/routes/api_v1.rs +++ b/src/routes/api_v1.rs @@ -43,3 +43,11 @@ pub async fn btf() -> impl Responder { HttpResponse::Ok().json(info) } + +#[get("/websites")] +pub async fn websites() -> impl Responder { + HttpResponse::Ok().json(( + "http://www.bocal.cs.univ-paris8.fr/~akennel/", + "https://anri.up8.site/", + )) +} diff --git a/static/js/index.js b/static/js/index.js index 2835b33..0404526 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -18,6 +18,7 @@ window.addEventListener("load", () => { new Tag("Comment fonctionne un PC 😵‍💫"), new Tag("undefined", mono), new Tag("/api/v1/love", mono), + new Tag("/api/v1/websites", mono), new Tag("Peak D2 sur Valo 🤡"), new Tag( "0x520",