From: tomneedham Date: Thu, 14 Nov 2013 01:10:56 +0000 (+0000) Subject: Return result object when only one successful response is returned X-Git-Tag: v6.0.0beta5~33^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a39f3fdbf9fb20d9fa4c9cbba4765f9989f850ec;p=nextcloud-server.git Return result object when only one successful response is returned --- diff --git a/lib/private/api.php b/lib/private/api.php index 913b3ff0a18..76e00958a24 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -167,11 +167,11 @@ class OC_API { // Which reponse code should we return? // Maybe any that are not OC_API::RESPOND_SERVER_ERROR $response = reset($shipped['failed']); - return $response; + return $response['response']; } elseif(!empty($thirdparty['failed'])) { // Return the third party failure result $response = reset($thirdparty['failed']); - return $response; + return $response['response']; } else { $responses = $thirdparty['succeeded']; }