feat(guild): add guild and channel list APIs for frontend browser
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import { Body, Controller, Post } from '@nestjs/common';
|
||||
import { Body, Controller, Get, Post } from '@nestjs/common';
|
||||
import { GuildsService } from './guilds.service';
|
||||
|
||||
@Controller('guilds')
|
||||
export class GuildsController {
|
||||
constructor(private readonly guildsService: GuildsService) {}
|
||||
|
||||
@Get()
|
||||
list() {
|
||||
return this.guildsService.list();
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Body() body: Record<string, unknown>) {
|
||||
return { status: 'todo', action: 'create-guild', received: body };
|
||||
return this.guildsService.create(body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user