location handler

This commit is contained in:
2026-01-28 11:29:41 +01:00
parent b3d49869b0
commit 9d78c98bcb

19
src/handlers/locations.rs Normal file
View File

@@ -0,0 +1,19 @@
use actix_web::web::Json;
use serde_json::json;
async fn get_locations() -> impl Responder {
let locations = vec![];
Json(locations)
}
async fn create_location(Json(location): Json<Location>) -> impl Responder {
Json(location)
}
async fn update_location(Json(location): Json<Location>) -> impl Responder {
Json(location)
}
async fn delete_location(timestamp: i64) -> impl Responder {
format!("Deleted location with timestamp: {}", timestamp)
}