Fix gameservers for real this time
This commit is contained in:
parent
bce1dfcf90
commit
e92ac41318
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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((_) => _)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue