get the longer string filters working

This commit is contained in:
jmosrael@gmail.com
2024-05-18 14:56:07 -07:00
parent f0de240b8a
commit 97aab587df
2 changed files with 41 additions and 32 deletions

View File

@@ -49,7 +49,9 @@ app.post('/api/game', jsonParser, async (req, res) => {
order: orderBy,
where: filter
})
const pageCount = Math.ceil((await Character.count()) / count)
const pageCount = Math.ceil((await Game.count({
where: filter
})) / count)
res.setHeader('Content-Type', 'application/json')
res.send({ gameData, pageCount })