Metar overhaul, added footer, updated schemas

This commit is contained in:
2025-05-19 16:09:02 -04:00
parent 2ecb82ae63
commit ed98140d22
54 changed files with 1084 additions and 4924 deletions

View File

@@ -12,23 +12,16 @@ pub struct SystemInfo {
}
#[utoipa::path(
tag = "System",
tag = "system",
responses(
(status = 200, description = "Successful system info"),
)
)]
#[get("/info")]
async fn info() -> HttpResponse {
let mut healthy = true;
let version = match env::var("CARGO_PKG_VERSION") {
Ok(v) => v,
Err(_) => {
healthy = false;
String::from("unknown")
}
};
let info = SystemInfo { version, healthy };
let healthy = true;
let version = env!("CARGO_PKG_VERSION");
let info = SystemInfo { version: version.to_string(), healthy };
HttpResponse::Ok().json(info)
}