refactor: change in checking subscription

This commit is contained in:
prafull-opensignlabs
2024-04-15 19:14:24 +05:30
parent 598aa2975f
commit 0d5f8981fe
11 changed files with 155 additions and 101 deletions
@@ -31,6 +31,13 @@ export default async function saveInvoice(request, response) {
className: '_User',
objectId: extUser.get('UserId').id,
});
if (extUser?.get('TenantId')?.id) {
createInvoice.set('TenantId', {
__type: 'Pointer',
className: 'partners_Tenant',
objectId: extUser.get('TenantId').id,
});
}
await createInvoice.save(null, { useMasterKey: true });
return response.status(200).json({ status: 'create invoice!' });
}