diff options
Diffstat (limited to 'lib/private/api.php')
-rw-r--r-- | lib/private/api.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/api.php b/lib/private/api.php index 804d9346842..23924c518bb 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -85,11 +85,12 @@ class OC_API { */ public static function call($parameters) { $request = \OC::$server->getRequest(); + $method = $request->getMethod(); // Prepare the request variables - if($request->getMethod() === 'PUT') { + if($method === 'PUT') { $parameters['_put'] = $request->getParams(); - } else if($request->getMethod() === 'DELETE') { + } else if($method === 'DELETE') { $parameters['_delete'] = $request->getParams(); } $name = $parameters['_route']; |