ast constructed

This commit is contained in:
jmosrael@gmail.com
2024-05-16 22:42:45 -07:00
parent f644c9001c
commit 3094ae3a08
2 changed files with 59 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import express from 'express'
import { json } from 'body-parser'
import { Sequelize } from 'sequelize'
import { Sequelize, Op } from 'sequelize'
import { database, Character, Game, Pick, App } from './db'
import { lexr, parseOrderByString, FilterParser } from './tokenizer'
@@ -46,7 +46,10 @@ app.post('/api/game', jsonParser, async (req, res) => {
const gameData = await Game.findAll({
offset: page * count,
limit: count,
order: orderBy
order: orderBy,
where: {
id: { [Op.eq]: 2 }
}
})
const pageCount = Math.ceil((await Character.count()) / count)