feat: affiche les versions API, Indexer et Backoffice dans About

- Endpoint GET /version sur l'indexer (sans auth)
- Le backoffice fetch la version indexer directement (INDEXER_BASE_URL)
- Grille 3 colonnes avec les 3 versions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 11:07:42 +01:00
parent 98d0f1c9c5
commit d32a7717a5
4 changed files with 33 additions and 3 deletions

View File

@@ -7,6 +7,12 @@ pub async fn health() -> &'static str {
"ok"
}
pub async fn version() -> Json<serde_json::Value> {
Json(serde_json::json!({
"indexer": env!("CARGO_PKG_VERSION"),
}))
}
pub async fn ready(State(state): State<AppState>) -> Result<Json<serde_json::Value>, StatusCode> {
sqlx::query("SELECT 1")
.execute(&state.pool)

View File

@@ -36,6 +36,7 @@ async fn async_main() -> anyhow::Result<()> {
let app = Router::new()
.route("/health", get(api::health))
.route("/version", get(api::version))
.route("/ready", get(api::ready))
.with_state(state.clone());