wip invite people
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user