feat: Update routing and websocket configuration for game state management

This commit is contained in:
2025-12-11 10:24:51 +01:00
parent 4463144d1b
commit 76258b3ca8
22 changed files with 173 additions and 151 deletions

View File

@@ -18,14 +18,15 @@ export const useUserInfo = defineStore('userInfo', () => {
gameId.value = id;
}
function requestState() {
axios.get(`${api}/status`, {withCredentials: true}).then((response) => {
async function requestState() {
await axios.get(`${api}/status`, {withCredentials: true}).then((response) => {
console.log("STATUS DATA:" + response.data.status + response.data.inGame)
username.value = response.data.username;
if (response.data.ingame) {
if (response.data.gameId) {
console.log("GAMEID:" + response.data.gameId)
gameId.value = response.data.gameId;
}
});
})
}
function clearUserInfo() {