llp преди 1 ден
родител
ревизия
e0da29122f
променени са 1 файла, в които са добавени 2 реда и са изтрити 4 реда
  1. 2 4
      packages/Longyi/Gift/src/Http/Controllers/Shop/GiftController.php

+ 2 - 4
packages/Longyi/Gift/src/Http/Controllers/Shop/GiftController.php

@@ -114,7 +114,7 @@ class GiftController extends Controller
                ->where('customer_id', $customerId)->first();
                ->where('customer_id', $customerId)->first();
            $cart = Cart::getCart();
            $cart = Cart::getCart();
            if (!$giftCard) {
            if (!$giftCard) {
-               return ApiResponse::error('Coupon not found.');
+               return ApiResponse::error('giftcard not found.');
            }
            }
            $remainingGiftcardAmount = core()->convertPrice($giftCard->remaining_giftcard_amount);
            $remainingGiftcardAmount = core()->convertPrice($giftCard->remaining_giftcard_amount);
            if ($remainingGiftcardAmount <= 0) {
            if ($remainingGiftcardAmount <= 0) {
@@ -162,9 +162,7 @@ class GiftController extends Controller
         }
         }
 
 
         // Return response with updated cart data
         // Return response with updated cart data
-        return ApiResponse::success([
-                'data'     => new CustomCartResource(Cart::getCart())
-            ], trans('gift::app.giftcard.remove'));
+        return ApiResponse::success(new CustomCartResource(Cart::getCart()), trans('gift::app.giftcard.remove'));
     }
     }
 
 
     /**
     /**