From cb8326309c2788b817069a6b17c97327055c1784 Mon Sep 17 00:00:00 2001 From: c0mrade Date: Wed, 4 Feb 2026 05:15:23 +0300 Subject: [PATCH] Fix promo deactivation to use correct API method Use clearActiveDiscount instead of deactivateDiscount Correct endpoint: DELETE /cabinet/promo/active-discount --- src/components/PromoOffersSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PromoOffersSection.tsx b/src/components/PromoOffersSection.tsx index a000b20..f47622f 100644 --- a/src/components/PromoOffersSection.tsx +++ b/src/components/PromoOffersSection.tsx @@ -266,7 +266,7 @@ export default function PromoOffersSection({ className = '' }: PromoOffersSectio // Deactivate discount mutation const deactivateMutation = useMutation({ - mutationFn: promoApi.deactivateDiscount, + mutationFn: promoApi.clearActiveDiscount, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ['active-discount'] }); queryClient.invalidateQueries({ queryKey: ['promo-offers'] });