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((_) => _)