wip pbm join room return wrong room
This commit is contained in:
4
Makefile
4
Makefile
@@ -28,6 +28,10 @@ destroy:
|
||||
db:
|
||||
- docker rm -f postgresql
|
||||
- docker rm -f nestjs
|
||||
#- docker rm -f redis
|
||||
#- docker rm -f game_server
|
||||
#- docker rm -f nginx
|
||||
#- docker rm -f svelte
|
||||
- docker volume rm -f srcs_data_nest_postgresql
|
||||
docker compose -f ${DOCKERCOMPOSEPATH} up -d --build
|
||||
@make start
|
||||
|
||||
@@ -139,7 +139,7 @@ export class ChatController {
|
||||
{
|
||||
console.log("- in changeRoom controller");
|
||||
|
||||
const response = await this.chatService.setCurrentRoom(req.user.username, room.name);
|
||||
await this.chatService.setCurrentRoom(req.user.username, room.name);
|
||||
let socket: socketDto = this.chatGateway.sockets.get(req.user.username);
|
||||
await this.chatService.socketChangeRoom(socket, room.name);
|
||||
res.status(HttpStatus.OK).json({ room: room });
|
||||
|
||||
@@ -121,19 +121,11 @@ export async function get_room_users()
|
||||
|
||||
const response = await fetch('/api/v2/chat/roomusers');
|
||||
const data = await response.json();
|
||||
console.log("users:", data.users);
|
||||
|
||||
return data.users;
|
||||
}
|
||||
|
||||
export async function leave_room()
|
||||
{
|
||||
console.log("in leave_room");
|
||||
|
||||
const response = await fetch('/api/v2/chat/leave', {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
export async function get_all_users()
|
||||
{
|
||||
console.log("in get_all_users");
|
||||
@@ -145,4 +137,13 @@ export async function get_all_users()
|
||||
return data.users;
|
||||
}
|
||||
|
||||
export async function leave_room()
|
||||
{
|
||||
console.log("in leave_room");
|
||||
|
||||
const response = await fetch('/api/v2/chat/leave', {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user