Correct the api response when both a shipped app and/or a third party app fail
This commit is contained in:
parent
a0df5903b0
commit
b3e7485612
1 changed files with 2 additions and 2 deletions
|
@ -155,11 +155,11 @@ class OC_API {
|
|||
// They may have failed for different reasons (different status codes)
|
||||
// Which reponse code should we return?
|
||||
// Maybe any that are not OC_API::RESPOND_SERVER_ERROR
|
||||
$response = $shipped['failed'][0];
|
||||
$response = reset($shipped['failed']);
|
||||
return $response;
|
||||
} else {
|
||||
// Return the third party failure result
|
||||
$response = $thirdparty['failed'][0];
|
||||
$response = reset($thirdparty['failed']);
|
||||
return $response;
|
||||
}
|
||||
// Merge the successful responses
|
||||
|
|
Loading…
Reference in a new issue