aboutsummaryrefslogtreecommitdiff
path: root/src/routes/status.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2023-10-29 19:55:26 +0100
committerFxQnLr <[email protected]>2023-10-29 19:55:26 +0100
commit0cca10290d089aabac8f2e4356cfaf80f06ae194 (patch)
tree708d44f2c439bb23b664114e16d92af63c693f3b /src/routes/status.rs
parent00dd8a9abee6b9f0cfc37c6f20f30f0d99dfe91a (diff)
downloadwebol-0cca10290d089aabac8f2e4356cfaf80f06ae194.tar
webol-0cca10290d089aabac8f2e4356cfaf80f06ae194.tar.gz
webol-0cca10290d089aabac8f2e4356cfaf80f06ae194.zip
does what is expected, but badly
Diffstat (limited to 'src/routes/status.rs')
-rw-r--r--src/routes/status.rs2
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 @@
1use std::sync::Arc; 1use std::sync::Arc;
2use axum::extract::{State, WebSocketUpgrade}; 2use axum::extract::{State, WebSocketUpgrade};
3use axum::response::Response; 3use axum::response::Response;
4use serde::Deserialize;
5use crate::AppState; 4use crate::AppState;
6use crate::services::ping::status_websocket; 5use crate::services::ping::status_websocket;
7 6
8#[axum_macros::debug_handler] 7#[axum_macros::debug_handler]
9pub async fn status(State(state): State<Arc<AppState>>, ws: WebSocketUpgrade) -> Response { 8pub 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