summaryrefslogtreecommitdiff
path: root/src/routes/start.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/start.rs')
-rw-r--r--src/routes/start.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/routes/start.rs b/src/routes/start.rs
index 3bccb0f..c2c9378 100644
--- a/src/routes/start.rs
+++ b/src/routes/start.rs
@@ -11,6 +11,7 @@ use crate::config::SETTINGS;
11use crate::wol::{create_buffer, send_packet}; 11use crate::wol::{create_buffer, send_packet};
12use crate::db::Device; 12use crate::db::Device;
13use crate::error::WebolError; 13use crate::error::WebolError;
14use crate::services::ping::PingValue;
14 15
15#[axum_macros::debug_handler] 16#[axum_macros::debug_handler]
16pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<StartPayload>) -> Result<Json<Value>, WebolError> { 17pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<StartPayload>) -> Result<Json<Value>, WebolError> {
@@ -46,7 +47,7 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
46 let uuid_genc = uuid_gen.clone(); 47 let uuid_genc = uuid_gen.clone();
47 tokio::spawn(async move { 48 tokio::spawn(async move {
48 debug!("Init ping service"); 49 debug!("Init ping service");
49 state.ping_map.insert(uuid_gen.clone(), (device.ip.clone(), false)); 50 state.ping_map.insert(uuid_gen.clone(), PingValue { ip: device.ip.clone(), online: false });
50 51
51 warn!("{:?}", state.ping_map); 52 warn!("{:?}", state.ping_map);
52 53