Return result object when only one successful response is returned
This commit is contained in:
parent
790055571d
commit
a39f3fdbf9
|
@ -167,11 +167,11 @@ class OC_API {
|
||||||
// Which reponse code should we return?
|
// Which reponse code should we return?
|
||||||
// Maybe any that are not OC_API::RESPOND_SERVER_ERROR
|
// Maybe any that are not OC_API::RESPOND_SERVER_ERROR
|
||||||
$response = reset($shipped['failed']);
|
$response = reset($shipped['failed']);
|
||||||
return $response;
|
return $response['response'];
|
||||||
} elseif(!empty($thirdparty['failed'])) {
|
} elseif(!empty($thirdparty['failed'])) {
|
||||||
// Return the third party failure result
|
// Return the third party failure result
|
||||||
$response = reset($thirdparty['failed']);
|
$response = reset($thirdparty['failed']);
|
||||||
return $response;
|
return $response['response'];
|
||||||
} else {
|
} else {
|
||||||
$responses = $thirdparty['succeeded'];
|
$responses = $thirdparty['succeeded'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue