From 501966f94c4df6fe2dbb876c5e32d9b934865a29 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Thu, 12 Jun 2025 16:44:56 +0500 Subject: [PATCH] card transactions fully tested --- .../CardTransactionsController.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Http/Controllers/Api/CardTransaction/CardTransactionsController.php b/app/Http/Controllers/Api/CardTransaction/CardTransactionsController.php index 5a04f29..648db75 100644 --- a/app/Http/Controllers/Api/CardTransaction/CardTransactionsController.php +++ b/app/Http/Controllers/Api/CardTransaction/CardTransactionsController.php @@ -128,19 +128,19 @@ class CardTransactionsController extends Controller ]); } - // /** - // * DELETE* - // */ - // public function destroy(LoanRemainingOrder $order): JsonResponse - // { - // if ($order->user_id != auth()->id()) { - // return response()->json(status: 403); - // } + /** + * DELETE* + */ + public function destroy(CardTransaction $order): JsonResponse + { + if ($order->user_id != auth()->id()) { + return response()->json(status: 403); + } - // $order->delete(); + $order->delete(); - // return response()->json([ - // 'message' => __('Successfully deleted'), - // ]); - // } + return response()->json([ + 'message' => __('Successfully deleted'), + ]); + } }