card transactions fully tested
This commit is contained in:
@@ -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'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user