fix: returning string for page number

This commit is contained in:
원더 2021-02-12 13:08:45 +09:00
parent 9755201323
commit 27f07cf7d6

View File

@ -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(