diff options
Diffstat (limited to 'src/routes')
-rw-r--r-- | src/routes/device.rs | 2 | ||||
-rw-r--r-- | src/routes/start.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/device.rs b/src/routes/device.rs index 678d117..a3308d4 100644 --- a/src/routes/device.rs +++ b/src/routes/device.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | use axum::extract::State; | 2 | use axum::extract::State; |
3 | use axum::headers::HeaderMap; | ||
4 | use axum::Json; | 3 | use axum::Json; |
4 | use axum::http::HeaderMap; | ||
5 | use serde::{Deserialize, Serialize}; | 5 | use serde::{Deserialize, Serialize}; |
6 | use serde_json::{json, Value}; | 6 | use serde_json::{json, Value}; |
7 | use tracing::{debug, info}; | 7 | use tracing::{debug, info}; |
diff --git a/src/routes/start.rs b/src/routes/start.rs index 1555db3..a206cbd 100644 --- a/src/routes/start.rs +++ b/src/routes/start.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use axum::headers::HeaderMap; | ||
2 | use axum::Json; | 1 | use axum::Json; |
2 | use axum::http::HeaderMap; | ||
3 | use serde::{Deserialize, Serialize}; | 3 | use serde::{Deserialize, Serialize}; |
4 | use std::sync::Arc; | 4 | use std::sync::Arc; |
5 | use axum::extract::State; | 5 | use axum::extract::State; |
@@ -60,7 +60,7 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap | |||
60 | debug!("init ping service"); | 60 | debug!("init ping service"); |
61 | state.ping_map.insert(uuid_gen.clone(), PingValue { ip: device.ip.clone(), online: false }); | 61 | state.ping_map.insert(uuid_gen.clone(), PingValue { ip: device.ip.clone(), online: false }); |
62 | 62 | ||
63 | crate::services::ping::spawn(state.ping_send.clone(), device, uuid_gen.clone(), &state.ping_map, &state.db).await | 63 | crate::services::ping::spawn(state.ping_send.clone(), device, uuid_gen.clone(), &state.ping_map, &state.db).await; |
64 | }); | 64 | }); |
65 | Some(uuid_genc) | 65 | Some(uuid_genc) |
66 | } else { None }; | 66 | } else { None }; |