Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
  • Loading branch information
patrickelectric committed Feb 23, 2025
1 parent beda80f commit 322ea9c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/web/routes/v1/rest/vehicles.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::drivers::rest::control;
use axum::{http::header, response::IntoResponse};

pub(crate) async fn vehicles() -> impl IntoResponse {
let vehicles = control::vehicles();
let json = serde_json::to_string_pretty(&vehicles).unwrap();
([(header::CONTENT_TYPE, "application/json")], json).into_response()
}

0 comments on commit 322ea9c

Please sign in to comment.