From 8fab2e7c3a38a91c8f5549b639e7f2ac4ae1a420 Mon Sep 17 00:00:00 2001 From: fx Date: Sat, 21 Oct 2023 17:43:31 +0200 Subject: added device add and update --- src/requests/get.rs | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 src/requests/get.rs (limited to 'src/requests/get.rs') diff --git a/src/requests/get.rs b/src/requests/get.rs deleted file mode 100644 index 225562d..0000000 --- a/src/requests/get.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::{error::CliError, config::SETTINGS, default_headers}; - -pub fn get(id: String) -> Result<(), CliError> { - let res = reqwest::blocking::Client::new() - .get( - format!( - "{}/start", - SETTINGS.get_string("server").map_err(CliError::Config)? - ) - ) - .headers(default_headers()?) - .body( - format!(r#"{{"id": "{}"}}"#, id) - ) - .send() - .map_err(CliError::Reqwest)? - .text(); - - println!("{:?}", res); - Ok(()) -} -- cgit v1.2.3