add parameter filter to all apis

This commit is contained in:
Marc Michalsky forumZFD 2021-02-09 16:12:25 +01:00
parent a79e534099
commit 6fd9521f08
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
13 changed files with 69 additions and 1 deletions

View file

@ -68,6 +68,11 @@ function _civicrm_api3_twingle_project_Sync_spec(array &$spec) {
*/
function civicrm_api3_twingle_project_Sync(array $params): array {
// filter parameters
$allowed_params = [];
_civicrm_api3_twingle_project_Sync_spec($allowed_params);
$params = array_intersect_key($params, $allowed_params);
// If call provides an API key, use it instead of the API key set
// on the extension settings page
$apiKey = empty($params['twingle_api_key'])