update pos consumer module
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { TokenAccount } from '@/common/decorators/tokenInfo.decorator'
|
||||
import { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { AccountsService } from './accounts.service'
|
||||
@@ -9,7 +10,7 @@ export class AccountsController {
|
||||
constructor(private readonly accountsService: AccountsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('consumerId') consumerId: string) {
|
||||
async findAll(@TokenAccount('userId') consumerId: string) {
|
||||
return this.accountsService.findAll(consumerId)
|
||||
}
|
||||
|
||||
@@ -20,7 +21,7 @@ export class AccountsController {
|
||||
|
||||
@Post()
|
||||
async create(
|
||||
@Param('consumerId') consumerId: string,
|
||||
@TokenAccount('userId') consumerId: string,
|
||||
@Body() data: CreateConsumerAccountDto,
|
||||
) {
|
||||
return this.accountsService.create(consumerId, data)
|
||||
|
||||
Reference in New Issue
Block a user