From e92ac413186650e65b602740cc5f1402ce180db3 Mon Sep 17 00:00:00 2001 From: I-Have-An-Issue <34550332+I-Have-An-Issue@users.noreply.github.com> Date: Tue, 21 Feb 2023 17:49:42 -0500 Subject: [PATCH] Fix gameservers for real this time --- src/lib/classes/GameJob.js | 1 + src/routes/game/start.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lib/classes/GameJob.js b/src/lib/classes/GameJob.js index 9ab12c5..f7fca83 100644 --- a/src/lib/classes/GameJob.js +++ b/src/lib/classes/GameJob.js @@ -32,6 +32,7 @@ class GameJob extends Job { { type: "LUA_TNUMBER", value: id }, { type: "LUA_TNUMBER", value: port }, + { type: "LUA_TSTRING", value: process.env.ARBITER_TOKEN }, ], }, }).catch((e) => reject(e)) diff --git a/src/routes/game/start.js b/src/routes/game/start.js index 24deea3..84b73a6 100644 --- a/src/routes/game/start.js +++ b/src/routes/game/start.js @@ -16,6 +16,7 @@ function getGameById(id) { app.get("/:id", async (request, response) => { const game = global.games.get(getGameById(request.params.id)?.id) if (game) return response.status(400).json({ error: "Game is running" }) + const job = new GameJob() const result = await job.StartGame(request.params.id, request.query.port).catch((_) => _)