This commit is contained in:
Lukian 2024-09-16 17:58:43 +02:00
parent cbe05f3937
commit 1d4417af9b
5 changed files with 5 additions and 5 deletions

View file

@ -23,7 +23,7 @@ router.post('/', async (req, res) => {
return res.status(400).send({error: "token expired"}); return res.status(400).send({error: "token expired"});
} }
const connection = getConnection(); const connection = await getConnection();
const game = await getGame(connection, gameid); const game = await getGame(connection, gameid);

View file

@ -26,7 +26,7 @@ router.post('/', async (req, res) => {
return res.status(400).send({error: "invalid token"}); return res.status(400).send({error: "invalid token"});
} }
const connection = getConnection(); const connection = await getConnection();
const game = await getGame(connection, gameid) const game = await getGame(connection, gameid)
connection.end(); connection.end();

View file

@ -26,7 +26,7 @@ router.post('/', async (req, res) => {
return res.status(400).send({error: "invalid token"}); return res.status(400).send({error: "invalid token"});
} }
const connection = getConnection(); const connection = await getConnection();
const helpers = await getHelpers(gameid) const helpers = await getHelpers(gameid)
connection.end(); connection.end();

View file

@ -22,7 +22,7 @@ router.post('/', async (req, res) => {
return res.status(400).send({error: "invalid token"}); return res.status(400).send({error: "invalid token"});
} }
const connection = getConnection(); const connection = await getConnection();
const games = await getGames(); const games = await getGames();
connection.end(); connection.end();
res.status(200).send(games); res.status(200).send(games);

View file

@ -23,7 +23,7 @@ router.post('/', async (req, res) => {
return res.status(400).send({error: "token expired"}); return res.status(400).send({error: "token expired"});
} }
const connection = getConnection(); const connection = await getConnection();
const game = await getGame(gameid); const game = await getGame(gameid);
if (!game[0]) { if (!game[0]) {