summaryrefslogtreecommitdiffstats
path: root/src/api/stats.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/stats.rs')
-rw-r--r--src/api/stats.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/api/stats.rs b/src/api/stats.rs
index fabbffd..fa64600 100644
--- a/src/api/stats.rs
+++ b/src/api/stats.rs
@@ -21,7 +21,9 @@ use crate::transport::traffic::PeerTraffic;
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct StatsResponse {
- public_key: String,
+ node_id: String,
+ /// Where this node can be reached (`Transport::local_addresses`).
+ addresses: Vec<String>,
alias: Option<String>,
uptime_secs: u64,
ready: bool,
@@ -228,7 +230,8 @@ async fn collect(state: &AppState) -> StatsResponse {
}
StatsResponse {
- public_key: state.local_id().to_owned(),
+ node_id: state.local_id().to_owned(),
+ addresses: state.transport.local_addresses(),
alias: state.alias.clone(),
uptime_secs: node.uptime.as_secs(),
ready: state.is_ready().await,