From f7364aa45b2de1f366c60637546598ae9d8c4999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Fri, 10 Aug 2018 15:35:26 +0200 Subject: [PATCH] Also mount Endpoint for PATCH and OPTIONS It seems that you forgot to mount endpoints for HttpMethods::PATCH and HttpMethods::DELETE. --- src/PhalconRest/Api/ApiCollection.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PhalconRest/Api/ApiCollection.php b/src/PhalconRest/Api/ApiCollection.php index 4d16642..d069d3f 100644 --- a/src/PhalconRest/Api/ApiCollection.php +++ b/src/PhalconRest/Api/ApiCollection.php @@ -146,6 +146,16 @@ public function endpoint(ApiEndpoint $endpoint) $this->delete($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint)); break; + + case HttpMethods::PATCH: + + $this->patch($endpoint->getPath(), $endpoint->getHandlerMethod(),$this->createRouteName($endpoint)); + break; + + case HttpMethods::OPTIONS: + + $this->options($endpoint->getPath(), $endpoint->getHandlerMethod(),$this->createRouteName($endpoint)); + break; } return $this;