feat: bloc About avec versions dans les settings

- Endpoint GET /version (sans auth) retournant la version API
- Bloc About dans l'onglet General : nom du projet, description,
  versions API et Backoffice, lien GitHub

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 10:41:31 +01:00
parent 18756debfd
commit 98d0f1c9c5
6 changed files with 77 additions and 2 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!({
"api": env!("CARGO_PKG_VERSION"),
}))
}
pub async fn docs_redirect() -> impl axum::response::IntoResponse {
axum::response::Redirect::to("/swagger-ui/")
}

View File

@@ -199,6 +199,7 @@ async fn main() -> anyhow::Result<()> {
let app = Router::new()
.route("/health", get(handlers::health))
.route("/version", get(handlers::version))
.route("/ready", get(handlers::ready))
.route("/metrics", get(handlers::metrics))
.route("/docs", get(handlers::docs_redirect))