diff --git a/api/src/Controller/IndexController.php b/api/src/Controller/IndexController.php index c924f4e..57376c8 100644 --- a/api/src/Controller/IndexController.php +++ b/api/src/Controller/IndexController.php @@ -150,7 +150,7 @@ public function addToFavorite( $fruit = $fruits->find($id); // @INFO: Throw a 404 if a resource is not found - // @INFO: Ensure that request method is DELETE + // @INFO: Ensure that request method is POST if ( !$fruit instanceof Fruit || $request->getMethod() !== Request::METHOD_POST