Skip to content

Commit

Permalink
Add exception parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Oct 26, 2023
1 parent 3f0e306 commit 508f7e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
};
}
}

0 comments on commit 508f7e2

Please sign in to comment.