From 0bb3924836205a0364aaf0959c7cf387db004794 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 03:54:19 +0100 Subject: unify closing logic --- src/api/mod.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/api/mod.rs') diff --git a/src/api/mod.rs b/src/api/mod.rs index 1f178e7..58967f3 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -35,14 +35,7 @@ use crate::state::AppState; /// Builds the complete HTTP router. Everything except the API description (`/swagger-ui`, /// `/openapi.yaml`), `/health` and `/ready` is authenticated. -/// `closing` turns true when the node stops: long-lived responses (the dashboard's -/// events) end then. -pub(crate) fn router( - state: AppState, - auth_state: AuthState, - debug_api: bool, - closing: tokio::sync::watch::Receiver, -) -> Router { +pub(crate) fn router(state: AppState, auth_state: AuthState, debug_api: bool) -> Router { let mut api: Router = Router::new() .route("/store", get(store::get_store_root)) .route( @@ -67,10 +60,8 @@ pub(crate) fn router( #[cfg(feature = "dashboard")] { - api = api.merge(dashboard::router(state.clone(), closing)); + api = api.merge(dashboard::router(state.clone())); } - #[cfg(not(feature = "dashboard"))] - let _ = closing; if debug_api { warn!("Debug API enabled"); -- cgit v1.3.1