wip invite people

This commit is contained in:
hugogogo
2023-01-12 18:07:56 +01:00
parent a4b6d65fdf
commit 210e82269d
5 changed files with 33 additions and 6 deletions

View File

@@ -147,6 +147,21 @@ export class ChatController {
console.log("- out changeRoom controller");
}
@UseGuards(AuthenticateGuard)
@UseGuards(TwoFactorGuard)
@Post('invite')
async inviteUser(@Body() username: string, @Req() req, @Res() res): Promise<void>
{
console.log("- in inviteUser controller");
let current_room_name = await this.chatService.getCurrentRoomName(username);
await this.chatService.addUserToRoom(username, current_room_name);
res.status(HttpStatus.OK);
console.log("- out inviteUser controller");
}
@UseGuards(AuthenticateGuard)
@UseGuards(TwoFactorGuard)
@Delete('leave')