/api/v1/websites

This commit is contained in:
Mylloon 2024-09-19 15:50:37 +02:00
parent 396bff909e
commit 764a632ae6
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 15 additions and 2 deletions

View file

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

View file

@ -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/",
))
}

View file

@ -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",