fix: properly clean up product uploads
This commit is contained in:
parent
7a31dcbd9b
commit
5a9160f612
1 changed files with 9 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue