diff options
| author | tv <tv@krebsco.de> | 2026-10-24 06:53:17 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-24 06:53:17 +0200 |
| commit | c43ec6fefa89b093066dba9a0e692c01579637dc (patch) | |
| tree | 29754df22b5770c3e2bea5ba7ee5959f327dba22 /src/api/stats.rs | |
| parent | 37120cc143136bda1670fbb0d6f579fb8c83c2f6 (diff) | |
add node aliases
Diffstat (limited to 'src/api/stats.rs')
| -rw-r--r-- | src/api/stats.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/stats.rs b/src/api/stats.rs index b39e054..bc925ff 100644 --- a/src/api/stats.rs +++ b/src/api/stats.rs @@ -19,6 +19,8 @@ use crate::transport::traffic::PeerTraffic; #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub(crate) struct StatsResponse { + public_key: String, + alias: Option<String>, uptime_secs: u64, ready: bool, epoch: EpochInfo, @@ -147,6 +149,8 @@ async fn collect(state: &AppState) -> StatsResponse { } StatsResponse { + public_key: state.local_id().to_owned(), + alias: state.alias.clone(), uptime_secs: node.uptime.as_secs(), ready: state.is_ready().await, epoch: state.local_epoch().into(), |
