Skip to content

🔥 The free & Open Source DocuSign alternative

fix: not able to get response of invoices

prafull-opensignlabsce70da7d8e8c
diff --git a/apps/OpenSignServer/cloud/parsefunction/getInvoices.js b/apps/OpenSignServer/cloud/parsefunction/getInvoices.js
index 258595756..e5c63c8e4 100644
--- a/apps/OpenSignServer/cloud/parsefunction/getInvoices.js
+++ b/apps/OpenSignServer/cloud/parsefunction/getInvoices.js
@@ -14,10 +14,13 @@ export default async function getInvoices(request) {
});
const userId = userRes.data && userRes.data.objectId;
if (userId) {
+ if (!extUserId) {
+ return { status: 'error', result: 'Please provide parameter!' };
+ }
const invoiceCls = new Parse.Query('contracts_Invoices');
invoiceCls.equalTo('ExtUserPtr', {
__type: 'Pointer',
- className: 'contracts_User',
+ className: 'contracts_Users',
objectId: extUserId,
});
invoiceCls.limit(limit);