diff options
Diffstat (limited to 'src/routes/status.rs')
-rw-r--r-- | src/routes/status.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/routes/status.rs b/src/routes/status.rs index cdecf6a..4a5ec67 100644 --- a/src/routes/status.rs +++ b/src/routes/status.rs | |||
@@ -1,12 +1,10 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | use axum::extract::{State, WebSocketUpgrade}; | 2 | use axum::extract::{State, WebSocketUpgrade}; |
3 | use axum::response::Response; | 3 | use axum::response::Response; |
4 | use serde::Deserialize; | ||
5 | use crate::AppState; | 4 | use crate::AppState; |
6 | use crate::services::ping::status_websocket; | 5 | use crate::services::ping::status_websocket; |
7 | 6 | ||
8 | #[axum_macros::debug_handler] | 7 | #[axum_macros::debug_handler] |
9 | pub async fn status(State(state): State<Arc<AppState>>, ws: WebSocketUpgrade) -> Response { | 8 | pub async fn status(State(state): State<Arc<AppState>>, ws: WebSocketUpgrade) -> Response { |
10 | // TODO: remove unwrap | ||
11 | ws.on_upgrade(move |socket| status_websocket(socket, state.ping_send.clone(), state.ping_map.clone())) | 9 | ws.on_upgrade(move |socket| status_websocket(socket, state.ping_send.clone(), state.ping_map.clone())) |
12 | } \ No newline at end of file | 10 | } \ No newline at end of file |