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 Version {
pub build_timestamp: String,
pub git_branch: String,
@ -29,4 +29,7 @@ impl Version {
version_pre: env!("CARGO_PKG_VERSION_PRE").parse().unwrap()
}
}
pub fn to_string(self) -> String {
serde_json::to_string(&self).expect("Failed to parse into string")
}
}