Renamed endpoints.rs to endpoints_v1.rs
APIs will now use /v1/...
This commit is contained in:
parent
560b90be55
commit
8169dfd022
8 changed files with 66 additions and 19 deletions
|
@ -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")
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue