🐛 Fix on boost reupload

This commit is contained in:
2024-12-29 01:59:57 +08:00
parent 0e0ad9c261
commit 1955d94414
2 changed files with 5 additions and 4 deletions

View File

@@ -94,7 +94,7 @@ func ActivateBoost(boost models.AttachmentBoost) error {
return fmt.Errorf("invalid destination: %d", boost.Destination)
}
if err := ReUploadFile(boost.Attachment, boost.Destination); err != nil {
if err := ReUploadFile(boost.Attachment, boost.Destination, true); err != nil {
log.Warn().Any("boost", boost).Err(err).Msg("Unable to activate boost...")
database.C.Model(&boost).Update("status", models.BoostStatusError)
return err