wip users with db

This commit is contained in:
simplonco
2023-01-02 14:27:51 +01:00
parent b893a2a05f
commit 32187fa06c

View File

@@ -27,15 +27,19 @@ export class ChatGateway
// how to guard the handleConnection ?
// https://github.com/nestjs/nest/issues/882
async handleConnection(client) {
const paginationQuery = new PaginationQueryDto();
const users = await this.usersService.findAll(paginationQuery);
console.log('---- Client connected :', client.id);
console.log('users :', users);
}
handleDisconnect(client) {
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);
}
}