consumer pos
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { TokenAccount } from '@/common/decorators/tokenInfo.decorator'
|
||||
import { Body, Controller, Get, Param, Patch } from '@nestjs/common'
|
||||
import { UpdateBusinessActivityDto } from './dto/poses.dto'
|
||||
import { PosesService } from './poses.service'
|
||||
|
||||
@Controller('consumer/poses')
|
||||
export class PosesController {
|
||||
constructor(private readonly service: PosesService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@TokenAccount('userId') userId: string) {
|
||||
return this.service.findAll(userId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@TokenAccount('userId') userId: string, @Param('id') id: string) {
|
||||
return this.service.findOne(userId, id)
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
async update(
|
||||
@TokenAccount('userId') userId: string,
|
||||
@Param('id') id: string,
|
||||
@Body() data: UpdateBusinessActivityDto,
|
||||
) {
|
||||
return this.service.update(userId, id, data)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user