import { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common' import { ApiTags } from '@nestjs/swagger' import { CreateGuildDto } from './dto/create-guild.dto' import { UpdateGuildDto } from './dto/update-guild.dto' import { GuildsService } from './guilds.service' @ApiTags('guilds') @Controller('admin/guilds') export class GuildsController { constructor(private readonly guildsService: GuildsService) {} @Get() async findAll() { return this.guildsService.findAll() } @Get(':id') async findOne(@Param('id') id: string) { return this.guildsService.findOne(id) } @Post() async create(@Body() data: CreateGuildDto) { return await this.guildsService.create(data) } @Patch(':id') async update(@Param('id') id: string, @Body() data: UpdateGuildDto) { return await this.guildsService.update(id, data) } // @Delete(':id') // async delete(@Param('id') id: string) { // await this.guildsService.delete(id) // return ResponseMapper.delete() // } }