Browse Source

SYSTEM | Log

pull/1/head
Vitalik 1 year ago
parent
commit
0ca1db0109
  1. 2
      src/domain/real-time/gateways/main.gateway.ts

2
src/domain/real-time/gateways/main.gateway.ts

@ -8,6 +8,7 @@ import { @@ -8,6 +8,7 @@ import {
import { Server, Socket } from 'socket.io'
import { JwtWsGuard } from '../guards'
import { WsServerService, WsUsersService } from '../services'
import { WsThrottlerGuard } from '../guards/ws-throtler.guard'
@WebSocketGateway({
transports: ['websocket', 'polling'],
@ -28,6 +29,7 @@ export class MainGateway { @@ -28,6 +29,7 @@ export class MainGateway {
}
@UseGuards(JwtWsGuard)
@UseGuards(WsThrottlerGuard)
@SubscribeMessage('join-user')
async onUserConnect(@MessageBody() data, @ConnectedSocket() client: Socket): Promise<void> {
await this.wsUsersService.joinUser(client, data)

Loading…
Cancel
Save