feat: add stickers delete api

This commit is contained in:
Krispire Admin
2026-08-30 10:31:37 +05:30
parent 4427849647
commit a2d22ed829
5 changed files with 111 additions and 0 deletions
+8
View File
@@ -478,6 +478,14 @@ func (s *SadhnaService) PresignGiftImage(ctx context.Context, contentType string
return presignImage(ctx, s.r2, "reward-gifts", "custom", contentType)
}
// DeleteCustomGift removes a custom sticker everywhere it is held.
func (s *SadhnaService) DeleteCustomGift(ctx context.Context, key string) error {
if !strings.HasPrefix(key, customKeyPrefix) {
return errors.New("only custom gifts can be deleted")
}
return s.rewards.DeleteCustom(ctx, key)
}
// GiftableRewards is the catalog an admin picks from.
func (s *SadhnaService) GiftableRewards(ctx context.Context) ([]model.SadhnaReward, error) {
return s.rewards.ListGiftable(ctx)