From f65ecfdf313658a3979a2d0add53e342ce4b97df Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Oct 2026 17:42:26 +0100 Subject: add dashboard --- src/api/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/api/mod.rs') 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::()); + #[cfg(feature = "dashboard")] + { + api = api.merge(dashboard::router(state.clone())); + } + if debug_api { warn!("Debug API enabled"); api = api.route( -- cgit v1.3.1