diff options
| author | tv <tv@krebsco.de> | 2026-10-31 03:54:19 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 03:54:19 +0100 |
| commit | 0bb3924836205a0364aaf0959c7cf387db004794 (patch) | |
| tree | 6ed4dd3e25b5138b735dc308a585fc85b5b91640 /src/api/mod.rs | |
| parent | 77e82b5f023a02ec05419a9f18ee600251bbb415 (diff) | |
unify closing logic
Diffstat (limited to 'src/api/mod.rs')
| -rw-r--r-- | src/api/mod.rs | 13 |
1 files changed, 2 insertions, 11 deletions
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<bool>, -) -> Router { +pub(crate) fn router(state: AppState, auth_state: AuthState, debug_api: bool) -> Router { let mut api: Router<AppState> = 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"); |
