build: update dependencies
This commit is contained in:
parent
407460d2aa
commit
36d3a18b08
5 changed files with 13 additions and 19 deletions
|
@ -188,7 +188,7 @@ impl Guild {
|
|||
// FIXME: Horrible security
|
||||
pub async fn set_icon(
|
||||
&mut self,
|
||||
bunny_cdn: &bunny_api_tokio::Client,
|
||||
bunny_storage: &bunny_api_tokio::EdgeStorageClient,
|
||||
conn: &mut Conn,
|
||||
cdn_url: Url,
|
||||
icon: BytesMut,
|
||||
|
@ -199,12 +199,12 @@ impl Guild {
|
|||
if let Some(icon) = &self.icon {
|
||||
let relative_url = icon.path().trim_start_matches('/');
|
||||
|
||||
bunny_cdn.storage.delete(relative_url).await?;
|
||||
bunny_storage.delete(relative_url).await?;
|
||||
}
|
||||
|
||||
let path = format!("icons/{}/icon.{}", self.uuid, image_type);
|
||||
|
||||
bunny_cdn.storage.upload(path.clone(), icon.into()).await?;
|
||||
bunny_storage.upload(path.clone(), icon.into()).await?;
|
||||
|
||||
let icon_url = cdn_url.join(&path)?;
|
||||
|
||||
|
|
|
@ -85,13 +85,12 @@ impl Me {
|
|||
|
||||
let relative_url = avatar_url.path().trim_start_matches('/');
|
||||
|
||||
data.bunny_cdn.storage.delete(relative_url).await?;
|
||||
data.bunny_storage.delete(relative_url).await?;
|
||||
}
|
||||
|
||||
let path = format!("avatar/{}/avatar.{}", self.uuid, image_type);
|
||||
|
||||
data.bunny_cdn
|
||||
.storage
|
||||
data.bunny_storage
|
||||
.upload(path.clone(), avatar.into())
|
||||
.await?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue