2026-04-24 02:20:15 +03:30
|
|
|
import { PartnerInfo } from '@/common/decorators/partnerInfo.decorator'
|
|
|
|
|
import { Controller, Get, Patch } from '@nestjs/common'
|
2026-04-13 15:47:59 +03:30
|
|
|
import { ApiTags } from '@nestjs/swagger'
|
2026-04-24 02:20:15 +03:30
|
|
|
import { UpdatePartnerProfileDto } from './dto/partner.dto'
|
2026-04-13 15:47:59 +03:30
|
|
|
import { PartnerService } from './partners.service'
|
|
|
|
|
|
|
|
|
|
@ApiTags('Partner')
|
|
|
|
|
@Controller('partner')
|
|
|
|
|
export class PartnerController {
|
|
|
|
|
constructor(private service: PartnerService) {}
|
|
|
|
|
|
|
|
|
|
@Get('')
|
2026-04-24 23:02:05 +03:30
|
|
|
async me(@PartnerInfo('id') partnerId: string) {
|
|
|
|
|
return this.service.me(partnerId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Get('info')
|
|
|
|
|
async getInfo(@PartnerInfo('id') partnerId: string) {
|
2026-04-24 02:20:15 +03:30
|
|
|
return this.service.getInfo(partnerId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Patch('profile')
|
|
|
|
|
async update(@PartnerInfo('id') partnerId: string, data: UpdatePartnerProfileDto) {
|
|
|
|
|
return this.service.updateInfo(partnerId, data)
|
2026-04-13 15:47:59 +03:30
|
|
|
}
|
|
|
|
|
}
|