feat: add stickers delete api
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user