Renamed endpoints.rs to endpoints_v1.rs

APIs will now use /v1/...
This commit is contained in:
Jordon Brooks 2023-06-24 02:19:55 +01:00
parent 560b90be55
commit 8169dfd022
8 changed files with 66 additions and 19 deletions

View file

@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize)]
#[derive(Deserialize, Serialize, Clone)]
pub struct Dock {
pub brand: String, // ex: JSAUX
pub model: String, // ex: HB0603
@ -14,9 +14,12 @@ impl Dock {
usb_ids: vec![],
}
}
pub fn to_string(self) -> String {
serde_json::to_string(&self).expect("Failed to parse into string")
}
}
#[derive(Deserialize, Serialize)]
#[derive(Deserialize, Serialize, Clone)]
pub struct DockInfo {
pub dock_info: Dock,
pub is_docked: bool,
@ -30,4 +33,7 @@ impl DockInfo {
fallback_detection: false
}
}
pub fn to_string(self) -> String {
serde_json::to_string(&self).expect("Failed to parse into string")
}
}