feat(partners): add utility functions for partner business activity allocation limits and remaining licenses
- Implemented `getPartnerBusinessActivityAllocationLimits` to retrieve allocation limits for a partner's business activity. - Added `ensurePartnerBusinessActivityHasRemainingAllocation` to validate remaining allocation credits. - Created `getPartnerRemainingLicenses` to count remaining licenses for a partner. - Developed `getPartnerFirstRemainingLicense` to fetch the first unused license for a partner. - Introduced `ensurePartnerHasRemainingLicense` to ensure a partner has at least one unused license.
This commit is contained in:
@@ -10,7 +10,12 @@ export class PartnerController {
|
||||
constructor(private service: PartnerService) {}
|
||||
|
||||
@Get('')
|
||||
async findOne(@PartnerInfo('id') partnerId: string) {
|
||||
async me(@PartnerInfo('id') partnerId: string) {
|
||||
return this.service.me(partnerId)
|
||||
}
|
||||
|
||||
@Get('info')
|
||||
async getInfo(@PartnerInfo('id') partnerId: string) {
|
||||
return this.service.getInfo(partnerId)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user