httpd: Copy RADICLE_VERSION to /

Also deprecates it on `api/v1/`
This commit is contained in:
Sebastian Martinez
2024-12-05 14:21:07 +01:00
parent 2fef0f5c9c
commit 2e8b817d53
+3
View File
@@ -30,6 +30,8 @@ use radicle::Profile;
use tracing_extra::{tracing_middleware, ColoredStatus, Paint, RequestId, TracingInfo};
use crate::api::RADICLE_VERSION;
mod api;
mod axum_extra;
mod cache;
@@ -138,6 +140,7 @@ fn router(options: Options, profile: Profile) -> anyhow::Result<Router> {
async fn root_index_handler() -> impl IntoResponse {
let response = serde_json::json!({
"welcome": "Welcome to the radicle-httpd JSON API, this service doesn't serve the Radicle Explorer web client.",
"version": format!("{}-{}", RADICLE_VERSION, env!("GIT_HEAD")),
"path": "/",
"links": [
{