From 9f22512afa2da9b3f0cc504eb098399eaba1b469 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 29 May 2023 02:19:00 +0200 Subject: [PATCH] fix: don't delete flag *objects* because flags can share hashes --- backend/db/flags.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/backend/db/flags.go b/backend/db/flags.go index 94e70ea..e722d16 100644 --- a/backend/db/flags.go +++ b/backend/db/flags.go @@ -268,12 +268,6 @@ func (db *DB) DeleteFlag(ctx context.Context, flagID xid.ID, hash string) error if err != nil { return errors.Wrap(err, "executing query") } - - err = db.minio.RemoveObject(ctx, db.minioBucket, "/flags/"+flagID.String()+"/"+hash+".webp", minio.RemoveObjectOptions{}) - if err != nil { - return errors.Wrap(err, "deleting flag") - } - return nil }