️ meet standard for getsingle api response

return array with object values instead of api success response
This commit is contained in:
Marc Michalsky forumZFD 2021-03-09 20:51:03 +01:00
parent 88a77456b8
commit d904ae931f
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
11 changed files with 59 additions and 95 deletions

View file

@ -120,15 +120,15 @@ function civicrm_api3_twingle_event_Sync(array $params): array {
if ($result['is_error'] == 0) {
// Get the event from Twingle
if ($result['values']['event_id']) {
if ($result['event_id']) {
$event_from_twingle = $twingleApi->getEvent(
$result['values']['project_id'],
$result['values']['event_id']
$result['project_id'],
$result['event_id']
);
// instantiate event from CiviCRM
try {
$event = _instantiateEvent($result['values']);
$event = _instantiateEvent($result);
} catch (CiviCRM_API3_Exception $e) {
Civi::log()->error(
$e->getMessage(),