fix getsingle apis

return an array that contains the values instead of an array that contains another array
This commit is contained in:
Marc Michalsky forumZFD 2021-02-09 16:30:43 +01:00
parent 6fd9521f08
commit 2533c97f4c
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
4 changed files with 27 additions and 16 deletions

View file

@ -65,5 +65,10 @@ function civicrm_api3_twingle_form_Getsingle(array $params): array {
if ($count != 1){
return civicrm_api3_create_error("Expected one TwingleForm but found $count");
}
return civicrm_api3_create_success($returnValues['values'], $params, 'TwingleForm', 'Getsingle');
return civicrm_api3_create_success(
$returnValues['values'][$returnValues['id']],
$params,
'TwingleForm',
'Getsingle'
);
}