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"});
}
const connection = getConnection();
const connection = await getConnection();
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"});
}
const connection = getConnection();
const connection = await getConnection();
const game = await getGame(connection, gameid)
connection.end();

View file

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

View file

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

View file

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