From 6851b7e89879ec6fa399dcbe26e994cffe45bdaf Mon Sep 17 00:00:00 2001 From: Adam Siwek <41082766+Timmlion@users.noreply.github.com> Date: Sun, 28 Jan 2024 14:54:25 +0100 Subject: [PATCH 1/2] Update main.js --- client/static/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/static/js/main.js b/client/static/js/main.js index 8ca7aec..dd20dfc 100644 --- a/client/static/js/main.js +++ b/client/static/js/main.js @@ -13,7 +13,7 @@ $(document).ready(function () { function initServer() { connection = new signalR.HubConnectionBuilder() // .withUrl("https://578d-87-206-130-93.ngrok-free.app/GameHub") - .withUrl("https://memethegatheringapi.azurewebsites.net/GameHub") + .withUrl("https://magicthememeingapiprod.azurewebsites.net/GameHub") // .withUrl("https://578d-87-206-130-93.ngrok-free.app/GameHub") .withAutomaticReconnect() .configureLogging(signalR.LogLevel.Information) @@ -363,4 +363,4 @@ function ForceEndgame(){ connection.invoke("DebugGameEnded", currentRoomID).catch(function (err) { return console.error(err.toString()); }); -} \ No newline at end of file +} From 01cdbe7afc4e53835e848436f8d5c0d3fa88de36 Mon Sep 17 00:00:00 2001 From: Adam Siwek <41082766+Timmlion@users.noreply.github.com> Date: Sun, 28 Jan 2024 15:07:03 +0100 Subject: [PATCH 2/2] Update GameHub.cs fix --- backend/MemeBE/hubs/GameHub.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/MemeBE/hubs/GameHub.cs b/backend/MemeBE/hubs/GameHub.cs index dcc2094..667ce1f 100644 --- a/backend/MemeBE/hubs/GameHub.cs +++ b/backend/MemeBE/hubs/GameHub.cs @@ -32,7 +32,7 @@ public async Task SendMessage(string user, string message) public async Task GetRooms() { - Console.WriteLine("GetRooms"); + /*Console.WriteLine("GetRooms"); try { string[] roomIDs = rooms.Values @@ -45,7 +45,7 @@ public async Task GetRooms() catch { // ignore - } + }*/ } public async Task CreateRoom(string playerName) @@ -294,7 +294,7 @@ public async Task GameEnded(Room room) await Clients.Group(room.RoomId) .SendAsync("GameEnded", message); - rooms.Remove(room.RoomId); + //rooms.Remove(room.RoomId); } public List GetOtherPlayers(Room room, string connId) { @@ -432,4 +432,4 @@ await Clients.Group(room.RoomId) // Target = 0 - all // 1 - player // 2 - persistent slot -} \ No newline at end of file +}