@ixiam/n8n-nodes-civicrm 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -116,8 +116,11 @@ class CiviCrm {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
else {
|
|
119
|
-
const res = await GenericFunctions_1.civicrmApiRequest.call(this, 'POST', `/civicrm/ajax/api4/${entity}/get`, (0, GenericFunctions_1.api4)(entity, 'get', { where, limit: cappedLimit }));
|
|
120
|
-
|
|
119
|
+
const res = await GenericFunctions_1.civicrmApiRequest.call(this, 'POST', `/civicrm/ajax/api4/${entity}/get`, (0, GenericFunctions_1.api4)(entity, 'get', { where, limit: cappedLimit, offset: 0 }));
|
|
120
|
+
let vals = (res?.values ?? []);
|
|
121
|
+
if (vals.length > cappedLimit) {
|
|
122
|
+
vals = vals.slice(0, cappedLimit);
|
|
123
|
+
}
|
|
121
124
|
for (const v of vals)
|
|
122
125
|
out.push({ json: v });
|
|
123
126
|
}
|