Fix integration with backblaze API (#461)

* Fix integration with backblaze API

* Remove keys (already reset, dw)
This commit is contained in:
Geometrically
2022-10-09 19:10:06 -07:00
committed by GitHub
parent 3e52f804a7
commit 07edb998e4
6 changed files with 11 additions and 37 deletions

View File

@@ -360,12 +360,10 @@ pub async fn user_icon_edit(
}
if let Some(icon) = icon_url {
if icon.starts_with(&cdn_url) {
let name = icon.split('/').next();
let name = icon.split(&format!("{cdn_url}/")).nth(1);
if let Some(icon_path) = name {
file_host.delete_file_version("", icon_path).await?;
}
if let Some(icon_path) = name {
file_host.delete_file_version("", icon_path).await?;
}
}