diff options
| author | tv <tv@krebsco.de> | 2026-10-30 17:42:26 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-30 17:42:26 +0100 |
| commit | f65ecfdf313658a3979a2d0add53e342ce4b97df (patch) | |
| tree | 57320539da53c39c3d0d37870f0f65ba33ca7fc8 /src/api/mod.rs | |
| parent | b224eee76a9314992ec7a83321803e11a0b0b37f (diff) | |
add dashboard
Diffstat (limited to 'src/api/mod.rs')
| -rw-r--r-- | src/api/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs index 2cb0415..fd05669 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -1,6 +1,8 @@ //! HTTP API: router, the API description and shared response helpers. pub(crate) mod auth; +#[cfg(feature = "dashboard")] +mod dashboard; mod debug; mod document; mod health; @@ -55,6 +57,11 @@ pub(crate) fn router(state: AppState, auth_state: AuthState, debug_api: bool) -> .route("/admin/config", get(get_config)) .merge(crate::remake::router::<AppState>()); + #[cfg(feature = "dashboard")] + { + api = api.merge(dashboard::router(state.clone())); + } + if debug_api { warn!("Debug API enabled"); api = api.route( |
