mylloon.fr/src/routes/api_v1.rs

15 lines
257 B
Rust
Raw Normal View History

2023-05-23 10:04:02 +02:00
use actix_web::{get, HttpResponse, Responder};
use serde::Serialize;
#[derive(Serialize)]
struct Info {
unix_epoch: u32,
}
#[get("/love")]
async fn love() -> impl Responder {
2023-05-23 10:04:02 +02:00
HttpResponse::Ok().json(Info {
unix_epoch: 1605576600,
})
}