refactor: capture errors with line numbers

refactor: update file api
This commit is contained in:
Paul Makles
2024-09-29 14:37:08 +01:00
parent 4fd66b2719
commit 3080ec1f5a
22 changed files with 273 additions and 130 deletions

View File

@@ -138,13 +138,13 @@ pub async fn edit(
// 3. Apply new icon
if let Some(icon) = icon {
partial.icon = Some(File::use_server_icon(db, &icon, &server.id).await?);
partial.icon = Some(File::use_server_icon(db, &icon, &server.id, &user.id).await?);
server.icon = partial.icon.clone();
}
// 4. Apply new banner
if let Some(banner) = banner {
partial.banner = Some(File::use_banner(db, &banner, &server.id).await?);
partial.banner = Some(File::use_server_banner(db, &banner, &server.id, &user.id).await?);
server.banner = partial.banner.clone();
}