feat: bootstrap from Fabric monorepo
This commit is contained in:
18
src/channels/channels.controller.ts
Normal file
18
src/channels/channels.controller.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Body, Controller, Get, Post, Query } from '@nestjs/common';
|
||||
import { ChannelsService } from './channels.service';
|
||||
|
||||
@Controller('channels')
|
||||
export class ChannelsController {
|
||||
constructor(private readonly channelsService: ChannelsService) {}
|
||||
|
||||
@Get()
|
||||
list(@Query('guildId') guildId?: string) {
|
||||
if (!guildId) return [];
|
||||
return this.channelsService.listByGuild(guildId);
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Body() body: Record<string, unknown>) {
|
||||
return this.channelsService.create(body);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user