commit
This commit is contained in:
parent
cbe05f3937
commit
1d4417af9b
5 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue