about summary refs log tree commit diff stats
path: root/crates/rocie-client/src/apis/api_set_unit_api.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-09-23 17:17:28 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-09-23 17:17:28 +0200
commit7682da81ff4c775eca048aaf0586593fb159cb85 (patch)
treee310245e136b21e15696ffee2756cc6f49f6ae73 /crates/rocie-client/src/apis/api_set_unit_api.rs
parentfeat(scripts/generate_api_client.sh): Make the API better by configuring the ... (diff)
downloadserver-7682da81ff4c775eca048aaf0586593fb159cb85.zip
chore(crates/rocie-client): Regenerate
Diffstat (limited to 'crates/rocie-client/src/apis/api_set_unit_api.rs')
-rw-r--r--crates/rocie-client/src/apis/api_set_unit_api.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/rocie-client/src/apis/api_set_unit_api.rs b/crates/rocie-client/src/apis/api_set_unit_api.rs
index e894fc3..dc88775 100644
--- a/crates/rocie-client/src/apis/api_set_unit_api.rs
+++ b/crates/rocie-client/src/apis/api_set_unit_api.rs
@@ -24,7 +24,7 @@ pub enum RegisterUnitError {
 }
 
 
-pub async fn register_unit(configuration: &configuration::Configuration, unit_stub: models::UnitStub) -> Result<uuid::Uuid, Error<RegisterUnitError>> {
+pub async fn register_unit(configuration: &configuration::Configuration, unit_stub: models::UnitStub) -> Result<models::UnitId, Error<RegisterUnitError>> {
     // add a prefix to parameters to efficiently prevent name collisions
     let p_unit_stub = unit_stub;
 
@@ -51,8 +51,8 @@ pub async fn register_unit(configuration: &configuration::Configuration, unit_st
         let content = resp.text().await?;
         match content_type {
             ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
-            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `uuid::Uuid`"))),
-            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `uuid::Uuid`")))),
+            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UnitId`"))),
+            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UnitId`")))),
         }
     } else {
         let content = resp.text().await?;