Skip to content

Commit 36c0004

Browse files
Support root grant icon fetches
1 parent 209f701 commit 36c0004

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

desktop/src/agent.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ impl AgentClient {
6666
}
6767

6868
pub fn root_grant_icon_png(&self, package_name: &str) -> Result<Vec<u8>> {
69-
let url = format!(
70-
"{}/api/v1/root-grants/{package_name}/icon",
71-
self.base_url()
72-
);
69+
let url = format!("{}/api/v1/root-grants/{package_name}/icon", self.base_url());
7370
let response = self
7471
.http
7572
.get(&url)
@@ -79,7 +76,10 @@ impl AgentClient {
7976
let body = response.text().unwrap_or_default();
8077
return Err(anyhow!("HTTP icon fetch failed: {}", body.trim()));
8178
}
82-
Ok(response.bytes().context("failed to read icon bytes")?.to_vec())
79+
Ok(response
80+
.bytes()
81+
.context("failed to read icon bytes")?
82+
.to_vec())
8383
}
8484

8585
pub fn set_module_enabled(&self, module_id: &str, enabled: bool) -> Result<String> {

0 commit comments

Comments
 (0)