fix new game going to bad url
This commit is contained in:
parent
158c710572
commit
5e949f3d30
2 changed files with 2 additions and 2 deletions
|
|
@ -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 } })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue