tinker with the page query for game list

This commit is contained in:
iamBadgers committed 2024-05-18 18:47:09 -07:00
1 parent 97aab587df
commit 8025424f7b
3 files changed
+49 -56

No files matched your search

+5 -3
View File
@@ -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 })