From 5a9160f6122c2b0b13a662f9802b7486f282fb58 Mon Sep 17 00:00:00 2001 From: trisua Date: Sun, 10 Aug 2025 00:19:57 -0400 Subject: [PATCH] fix: properly clean up product uploads --- crates/core/src/database/products.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/core/src/database/products.rs b/crates/core/src/database/products.rs index 24a2405..db8fce9 100644 --- a/crates/core/src/database/products.rs +++ b/crates/core/src/database/products.rs @@ -250,6 +250,15 @@ If your product is a purchase of goods or services, please be sure to fulfill th return Err(Error::NotAllowed); } + // remove uploads + for upload in product.uploads.thumbnails { + self.delete_upload(upload).await?; + } + + if product.uploads.reward != 0 { + self.delete_upload(product.uploads.reward).await?; + } + // ... let conn = match self.0.connect().await { Ok(c) => c,