16 lines
469 B
TypeScript
16 lines
469 B
TypeScript
import { ConsumerInfo } from '@/common/decorators/consumerInfo.decorator'
|
|
import { Controller, Get } from '@nestjs/common'
|
|
import { ApiTags } from '@nestjs/swagger'
|
|
import { ConsumerService } from './consumer.service'
|
|
|
|
@ApiTags('Consumer')
|
|
@Controller('consumer')
|
|
export class ConsumerController {
|
|
constructor(private service: ConsumerService) {}
|
|
|
|
@Get('')
|
|
async findOne(@ConsumerInfo('id') consumerId: string) {
|
|
return this.service.getInfo(consumerId)
|
|
}
|
|
}
|