mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix bug that would only return error responses for 3rdparty apps
This commit is contained in:
parent
8a5e88b21c
commit
ed0c23a9cc
1 changed files with 5 additions and 1 deletions
|
|
@ -147,6 +147,7 @@ class OC_API {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any error responses if there is one shipped response that succeeded
|
||||
if(!empty($shipped['succeeded'])) {
|
||||
$responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']);
|
||||
|
|
@ -157,14 +158,17 @@ class OC_API {
|
|||
// Maybe any that are not OC_API::RESPOND_SERVER_ERROR
|
||||
$response = reset($shipped['failed']);
|
||||
return $response;
|
||||
} else {
|
||||
} elseif(!empty($thirdparty['failed'])) {
|
||||
// Return the third party failure result
|
||||
$response = reset($thirdparty['failed']);
|
||||
return $response;
|
||||
} else {
|
||||
$responses = array_merge($shipped['succeeded'], $thirdparty['succeeded']);
|
||||
}
|
||||
// Merge the successful responses
|
||||
$meta = array();
|
||||
$data = array();
|
||||
|
||||
foreach($responses as $app => $response) {
|
||||
if(OC_App::isShipped($app)) {
|
||||
$data = array_merge_recursive($response->getData(), $data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue