diff --git a/backend/src/app.ts b/backend/src/app.ts index 70fbfba..ccdf91d 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -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 }) diff --git a/frontend/src/vues/CharacterList.vue b/frontend/src/vues/CharacterList.vue index 5e377b4..b19329b 100644 --- a/frontend/src/vues/CharacterList.vue +++ b/frontend/src/vues/CharacterList.vue @@ -51,7 +51,7 @@ let count = 10 async function loadData() { const response = await axios.post('/api/character', { page: `${page.value - 1}`, - count: `${count}`, + count: `10`, orderBy: 'id' }) @@ -60,7 +60,6 @@ async function loadData() { } function setPage(targetPage: number) { - console.log(targetPage) router.replace({ query: { page: targetPage } }) } diff --git a/frontend/src/vues/GameList.vue b/frontend/src/vues/GameList.vue index bdd6c7c..afcb2f8 100644 --- a/frontend/src/vues/GameList.vue +++ b/frontend/src/vues/GameList.vue @@ -1,94 +1,86 @@