feat(server): add /api/version endpoint exposing git hash

This commit is contained in:
Riz Ashraf committed 2026-09-12 09:00:38 +01:00
1 parent 248799ca5d
commit 44df610998
2 files changed
+17

No files matched your search

+6
View File
@@ -243,6 +243,12 @@ fn run_server(state: Arc<MemoryState>) -> Result<(), Box<dyn std::error::Error>>
});
let app = Router::new()
.route("/api/version", get(|| async move {
axum::Json(serde_json::json!({
"version": env!("CARGO_PKG_VERSION"),
"git_hash": option_env!("GIT_HASH").unwrap_or("unknown")
}))
}))
.route("/sse", get(sse_handler))
.route("/messages", post(message_handler))
.route("/health", get(health_handler))