fix new game going to bad url

This commit is contained in:
Zutatensuppe 2021-05-15 11:06:37 +02:00
parent 158c710572
commit 5e949f3d30
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ export default {
}) })
if (res.status === 200) { if (res.status === 200) {
const game = await res.json() const game = await res.json()
location.assign(game.url) this.$router.push({ name: 'game', params: { id: game.id } })
} }
} }
} }

View file

@ -104,7 +104,7 @@ app.post('/newgame', bodyParser.json(), async (req, res) => {
req.body.scoreMode req.body.scoreMode
) )
} }
res.send({ url: `/g/${gameId}` }) res.send({ id: gameId })
}) })
app.use('/common/', express.static(COMMON_DIR)) app.use('/common/', express.static(COMMON_DIR))