summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-03-01 11:46:39 +0100
committerLukas Reschke <lukas@owncloud.com>2015-03-01 11:46:39 +0100
commitfaddd1e2565d01aa55ca23ee809170eb0a2cba98 (patch)
treeb3a04c29e8a1ef02978fedb15544114c23bf4d3d
parent5c2fafa05faf532ab6e7ccde0ffadd8c984671fb (diff)
downloadnextcloud-server-faddd1e2565d01aa55ca23ee809170eb0a2cba98.tar.gz
nextcloud-server-faddd1e2565d01aa55ca23ee809170eb0a2cba98.zip
Simplify code
-rw-r--r--lib/private/api.php5
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'];