aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/dashboard/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 03:54:19 +0100
committertv <tv@krebsco.de>2026-10-31 03:54:19 +0100
commit089ba263cf84483b33070d786e1023520b2c9129 (patch)
tree3bab9d7f9e8bd087ce553bd857e5ed8b3ad1c692 /src/api/dashboard/mod.rs
parent4514af827e4ecad4c7bd15adde5f0b4ae66529a4 (diff)
unify closing logic
Diffstat (limited to 'src/api/dashboard/mod.rs')
-rw-r--r--src/api/dashboard/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/dashboard/mod.rs b/src/api/dashboard/mod.rs
index f0cbbfd..0a502a3 100644
--- a/src/api/dashboard/mod.rs
+++ b/src/api/dashboard/mod.rs
@@ -381,8 +381,9 @@ fn merge_patch(old: &JsonValue, new: &JsonValue) -> Option<JsonValue> {
}
/// The dashboard's routes (authenticated, as the rest of `/admin`), with their hub.
-/// `closing` turns true when the node stops (`Hub::closing`).
-pub(crate) fn router(state: AppState, closing: watch::Receiver<bool>) -> Router<AppState> {
+pub(crate) fn router(state: AppState) -> Router<AppState> {
+ // Its streams end when the node shuts down (`AppState::closing`).
+ let closing = state.closing.subscribe();
Router::new()
.route("/admin/dashboard", get(page_html))
.route("/admin/dashboard/state", get(current_state))