Update dependencies (#53)

* Removing new lines

* Updated reqwest, tokio, tokio-utils, and uuid

* Including Cargo.lock in source control

* Not sure how this got here

* Updated icarus_models

* Workflow change

* Removing unused workflow

* Github workflow fix

* Warning fixes

* Fixed what caused failed test

* Code cleanup and formatting
This commit was merged in pull request #53.
This commit is contained in:
KD
2025-07-02 12:26:38 -04:00
committed by GitHub
parent 8e6ddbc9df
commit 8b2b2f82e9
15 changed files with 1884 additions and 158 deletions
+6 -18
View File
@@ -2,32 +2,20 @@ use crate::models;
pub fn retrieve_url(api: &models::api::API, with_id: bool, id: &uuid::Uuid) -> String {
if with_id {
retrieve_url_with_id(&api, id)
retrieve_url_with_id(api, id)
} else {
retrieve_url_reg(&api)
retrieve_url_reg(api)
}
}
fn retrieve_url_reg(api: &models::api::API) -> String {
let mut url: String = String::from(&api.url);
url += &String::from("/");
url += &String::from("api/");
url += &String::from(&api.version);
url += &String::from("/");
url += &String::from(&api.endpoint);
url += &String::from("/");
let url = format!("{}/api/{}/{}/", api.url, api.version, api.endpoint);
return url;
url
}
fn retrieve_url_with_id(api: &models::api::API, id: &uuid::Uuid) -> String {
let mut url: String = String::from(&api.url);
url += &String::from("api/");
url += &String::from(&api.version);
url += &String::from("/");
url += &String::from(&api.endpoint);
url += &String::from("/");
url += &id.to_string();
let url = format!("{}/api/{}/{}/{}", api.url, api.version, api.endpoint, id);
return url;
url
}