wip users with db
This commit is contained in:
@@ -27,15 +27,19 @@ export class ChatGateway
|
|||||||
// how to guard the handleConnection ?
|
// how to guard the handleConnection ?
|
||||||
// https://github.com/nestjs/nest/issues/882
|
// https://github.com/nestjs/nest/issues/882
|
||||||
async handleConnection(client) {
|
async handleConnection(client) {
|
||||||
const paginationQuery = new PaginationQueryDto();
|
|
||||||
const users = await this.usersService.findAll(paginationQuery);
|
|
||||||
console.log('---- Client connected :', client.id);
|
console.log('---- Client connected :', client.id);
|
||||||
console.log('users :', users);
|
|
||||||
}
|
}
|
||||||
handleDisconnect(client) {
|
handleDisconnect(client) {
|
||||||
console.log('---- client disconnected :', client.id);
|
console.log('---- client disconnected :', client.id);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
|
@SubscribeMessage('test_users')
|
||||||
|
handleEvent(client: Socket, data: any): void {
|
||||||
|
const paginationQuery = new PaginationQueryDto();
|
||||||
|
const users = await this.usersService.findAll(paginationQuery);
|
||||||
|
console.log('users :', users);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user