Refactor Partner and POS models to replace 'serial' with 'serial_number' and update related services and DTOs
- Updated PartnerAccountQuotaAllocation model to change license relation. - Refactored Pos model to replace 'serial' with 'serial_number' across all references. - Modified BusinessActivitiesService to include license activation details in responses. - Adjusted ComplexPosesService to reflect changes in the Pos model. - Updated PartnerService to include a new method for updating partner profiles. - Created UpdatePartnerProfileDto for partner profile updates. - Added migration to drop 'serial' column and add unique 'serial_number' column in poses table.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ConsumerInfo } from '@/common/decorators/consumerInfo.decorator'
|
||||
import { Controller, Get } from '@nestjs/common'
|
||||
import { PartnerInfo } from '@/common/decorators/partnerInfo.decorator'
|
||||
import { Controller, Get, Patch } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { UpdatePartnerProfileDto } from './dto/partner.dto'
|
||||
import { PartnerService } from './partners.service'
|
||||
|
||||
@ApiTags('Partner')
|
||||
@@ -9,7 +10,12 @@ export class PartnerController {
|
||||
constructor(private service: PartnerService) {}
|
||||
|
||||
@Get('')
|
||||
async findOne(@ConsumerInfo('id') consumerId: string) {
|
||||
return this.service.getInfo(consumerId)
|
||||
async findOne(@PartnerInfo('id') partnerId: string) {
|
||||
return this.service.getInfo(partnerId)
|
||||
}
|
||||
|
||||
@Patch('profile')
|
||||
async update(@PartnerInfo('id') partnerId: string, data: UpdatePartnerProfileDto) {
|
||||
return this.service.updateInfo(partnerId, data)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user