From 508f7e2be08f5391e1f3caee8a617629222942b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 26 Oct 2023 21:19:16 +0200 Subject: [PATCH] Add exception parameter --- src/Http/Controllers/MediaController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/MediaController.php b/src/Http/Controllers/MediaController.php index 803131d1..9b5cc933 100644 --- a/src/Http/Controllers/MediaController.php +++ b/src/Http/Controllers/MediaController.php @@ -28,7 +28,7 @@ public function __invoke(Request $request): JsonResponse 'GET' => new JsonResponse($field->paginate($request, $model)), 'POST' => new JsonResponse($field->upload($request, $model), JsonResponse::HTTP_CREATED), 'DELETE' => new JsonResponse(['deleted' => $field->prune($request, $model, $request->input('ids', []))]), - default => throw new MethodNotAllowedHttpException(), + default => throw new MethodNotAllowedHttpException(['GET', 'POST', 'DELETE']), }; } }