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.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/routes/start.rs b/src/routes/start.rs
index b45fe5b..863ef16 100644
--- a/src/routes/start.rs
+++ b/src/routes/start.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
4use std::sync::Arc; 4use std::sync::Arc;
5use axum::extract::State; 5use axum::extract::State;
6use serde_json::{json, Value}; 6use serde_json::{json, Value};
7use tracing::info; 7use tracing::{debug, info};
8use crate::auth::auth; 8use crate::auth::auth;
9use crate::config::SETTINGS; 9use crate::config::SETTINGS;
10use crate::wol::{create_buffer, send_packet}; 10use crate::wol::{create_buffer, send_packet};
@@ -39,8 +39,12 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
39 )?; 39 )?;
40 40
41 if payload.ping.is_some_and(|ping| ping) { 41 if payload.ping.is_some_and(|ping| ping) {
42 tokio::spawn(async move {crate::services::ping::spawn(state.ping_send.clone()).await}); 42 debug!("ping true");
43 } 43 tokio::spawn(async move {
44 debug!("Init ping service");
45 crate::services::ping::spawn(state.ping_send.clone()).await
46 });
47 };
44 Ok(Json(json!(StartResponse { id: device.id, boot: true }))) 48 Ok(Json(json!(StartResponse { id: device.id, boot: true })))
45 } else { 49 } else {
46 Err(WebolError::Generic) 50 Err(WebolError::Generic)