tinker with the page query for game list
This commit is contained in:
@@ -49,9 +49,11 @@ app.post('/api/game', jsonParser, async (req, res) => {
|
||||
order: orderBy,
|
||||
where: filter
|
||||
})
|
||||
const pageCount = Math.ceil((await Game.count({
|
||||
where: filter
|
||||
})) / count)
|
||||
const pageCount = Math.ceil(
|
||||
(await Game.count({
|
||||
where: filter
|
||||
})) / count
|
||||
)
|
||||
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
res.send({ gameData, pageCount })
|
||||
|
||||
Reference in New Issue
Block a user