aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-12-16 01:45:29 +0100
committermetamuffin <metamuffin@disroot.org>2023-12-16 01:45:29 +0100
commitef4c1cec446a18141c08165380795fdbdb47de0d (patch)
tree2a0503776447044df2cf8af239f83492398c4546 /client
parent29a10b6fede6828e3da49272aefa5c8fe2c08078 (diff)
downloadjellything-ef4c1cec446a18141c08165380795fdbdb47de0d.tar
jellything-ef4c1cec446a18141c08165380795fdbdb47de0d.tar.bz2
jellything-ef4c1cec446a18141c08165380795fdbdb47de0d.tar.zst
move assetrole struct to common
Diffstat (limited to 'client')
-rw-r--r--client/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/lib.rs b/client/src/lib.rs
index b80f705..96349ed 100644
--- a/client/src/lib.rs
+++ b/client/src/lib.rs
@@ -93,7 +93,7 @@ impl Session {
pub async fn node_asset(
&self,
id: &str,
- role: &str,
+ role: AssetRole,
width: usize,
mut writer: impl tokio::io::AsyncWrite + std::marker::Unpin,
) -> Result<()> {
@@ -101,8 +101,9 @@ impl Session {
let mut r = self
.client
.get(format!(
- "{}/n/{id}/asset?role={role}&width={width}",
- self.instance.base()
+ "{}/n/{id}/asset?role={}&width={width}",
+ self.instance.base(),
+ role.as_str()
))
.send()
.await?;