summaryrefslogtreecommitdiff
path: root/src/routes/status.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/status.rs')
-rw-r--r--src/routes/status.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/routes/status.rs b/src/routes/status.rs
new file mode 100644
index 0000000..45f3e51
--- /dev/null
+++ b/src/routes/status.rs
@@ -0,0 +1,10 @@
1use std::sync::Arc;
2use axum::extract::{State, WebSocketUpgrade};
3use axum::response::Response;
4use crate::AppState;
5use crate::services::ping::status_websocket;
6
7#[axum_macros::debug_handler]
8pub async fn status(State(state): State<Arc<AppState>>, ws: WebSocketUpgrade) -> Response {
9 ws.on_upgrade(move |socket| status_websocket(socket, state))
10} \ No newline at end of file