From ccac75f503968b1990c598bca698cbe71b9a0e81 Mon Sep 17 00:00:00 2001 From: Pheuw1 Date: Thu, 16 Mar 2023 14:14:03 +0100 Subject: [PATCH] get channel/:id/users --- back/volume/src/chat/chat.controller.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/back/volume/src/chat/chat.controller.ts b/back/volume/src/chat/chat.controller.ts index b6b7a27..b8fc61f 100644 --- a/back/volume/src/chat/chat.controller.ts +++ b/back/volume/src/chat/chat.controller.ts @@ -83,6 +83,11 @@ export class ChatController { await this.channelService.save(channel) } + @Get(':id/users') + async getUsersOfChannel (@Param('id') id: number): Promise { + return (await this.channelService.getChannel(id)).users + } + @Post(':id/admin') async addAdmin ( @Param('id', ParseIntPipe) id: number,