summaryrefslogtreecommitdiff
path: root/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/device.rs2
-rw-r--r--src/routes/start.rs4
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 @@
1use std::sync::Arc; 1use std::sync::Arc;
2use axum::extract::State; 2use axum::extract::State;
3use axum::headers::HeaderMap;
4use axum::Json; 3use axum::Json;
4use axum::http::HeaderMap;
5use serde::{Deserialize, Serialize}; 5use serde::{Deserialize, Serialize};
6use serde_json::{json, Value}; 6use serde_json::{json, Value};
7use tracing::{debug, info}; 7use 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 @@
1use axum::headers::HeaderMap;
2use axum::Json; 1use axum::Json;
2use axum::http::HeaderMap;
3use serde::{Deserialize, Serialize}; 3use serde::{Deserialize, Serialize};
4use std::sync::Arc; 4use std::sync::Arc;
5use axum::extract::State; 5use 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 };