set invoke in nama

This commit is contained in:
2026-05-04 11:21:49 +03:30
parent a486127ade
commit 6a48f203a9
17 changed files with 711 additions and 240 deletions
@@ -66,13 +66,16 @@ export const getPartnerFirstRemainingLicense = async (
id: true,
charge_transaction_id: true,
accounts_limit: true,
parent: {
select: {
name: true,
},
},
},
})
if (!license) {
throw new BadRequestException(
'لایسنس فعال و استفاده نشده برای این شریک تجاری وجود ندارد.',
)
throw new BadRequestException(`لایسنس فعالی برای ${license.parent.name} وجود ندارد.`)
}
return license
@@ -85,9 +88,7 @@ export const ensurePartnerHasRemainingLicense = async (
const quota = await getPartnerRemainingLicenses(prisma, params)
if (quota.remaining_count <= 0) {
throw new BadRequestException(
'لایسنس فعال و استفاده نشده برای این شریک تجاری وجود ندارد.',
)
throw new BadRequestException('لایسنس فعالی برای این شریک تجاری وجود ندارد.')
}
return quota