From 27f07cf7d63fad3576ed1a0a4389bb22c6e8909a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Fri, 12 Feb 2021 13:08:45 +0900 Subject: [PATCH] fix: returning string for page number --- utils/Query.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/Query.ts b/utils/Query.ts index 61652a8..414386f 100644 --- a/utils/Query.ts +++ b/utils/Query.ts @@ -248,7 +248,8 @@ export const get = { async (key: string[]) => (await Promise.all(key.map(async (k: string) => { const json = JSON.parse(k) - return await getBotList('SEARCH', json.page, json.query) + const res = await getBotList('SEARCH', json.page, json.query) + return { ...res, totalPage: Number(res.totalPage), currentPage: Number(res.currentPage) } }))).map(row => serialize(row)) , { cacheMap: new TLRU({ maxStoreSize: 50, maxAgeMs: 3000000 }) }), votes: new DataLoader(