make ApiClient<Rule>::read consistend with other read ops

This commit is contained in:
Vincent Stuyck 2026-03-01 16:42:42 +01:00
parent f8a336429a
commit 1a4e35a60e

View File

@ -512,9 +512,9 @@ domain_update!(Rule, Rule);
domain_delete!(Rule); domain_delete!(Rule);
impl ApiClient<Rule> { impl ApiClient<Rule> {
pub async fn read(&self, id: Uuid) -> Result<Rule> { pub async fn read(&self, id: &str) -> Result<Rule> {
let mut object = self.inner.read_domain_object::<Rule, _>(id, &()).await?; let mut object = self.inner.read_domain_object::<Rule, _>(id, &()).await?;
object.extensions.id = Some(Uuid::parse_str(&object.id)?); object.extensions.id = Some(Uuid::parse_str(id)?);
Ok(object.extensions) Ok(object.extensions)
} }
pub async fn bulk_read(&self) -> Result<Vec<Rule>> { pub async fn bulk_read(&self) -> Result<Vec<Rule>> {