File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ use subvt_types::subvt::ValidatorSummary;
21
21
22
22
mod era;
23
23
mod metrics;
24
+ mod network;
24
25
mod onekv;
25
26
mod session;
26
27
mod staking;
@@ -237,6 +238,7 @@ impl Service for ReportService {
237
238
. service ( validator:: validator_reward_chart_service)
238
239
. service ( staking:: controller_service)
239
240
. service ( staking:: bond_service)
241
+ . service ( network:: get_network_status)
240
242
} )
241
243
. workers ( 10 )
242
244
. disable_signals ( )
Original file line number Diff line number Diff line change
1
+ use crate :: { ResultResponse , ServiceState } ;
2
+ use actix_web:: { get, web, HttpResponse } ;
3
+
4
+ #[ get( "/network/status" ) ]
5
+ pub ( crate ) async fn get_network_status ( data : web:: Data < ServiceState > ) -> ResultResponse {
6
+ Ok ( HttpResponse :: Ok ( ) . json ( data. redis . get_network_status ( ) . await ?) )
7
+ }
You can’t perform that action at this time.
0 commit comments