set invoke in nama
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user