transform core api codes into this project, update modules as admin/pos context modules
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||
import { CreateGoodDto } from './dto/create-good.dto'
|
||||
import { GoodsService } from './goods.service'
|
||||
|
||||
@Controller('admin/guilds/:guildId/goods')
|
||||
export class GoodsController {
|
||||
constructor(private readonly goodsService: GoodsService) {}
|
||||
|
||||
@Get()
|
||||
findAll(@Param('guildId') guildId: string) {
|
||||
return this.goodsService.findAll(guildId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('guildId') guildId: string, @Param('id') goodId: string) {
|
||||
return this.goodsService.findOne(guildId, goodId)
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Param('guildId') guildId: string, @Body() data: CreateGoodDto) {
|
||||
return this.goodsService.create(guildId, data)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user