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:
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user