Skip to content

Commit

Permalink
fix: do not fetch users on list queries
Browse files Browse the repository at this point in the history
  • Loading branch information
skinmaker1345 committed Oct 19, 2024
1 parent 1238fe0 commit cfd9400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/Query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async function getBotList(type: ListType, page = 1, query?: string): Promise<Lis

return {
type,
data: (await Promise.all(res.map(async (el) => await getBot(el.id)))).map((r) => ({ ...r })),
data: (await Promise.all(res.map(async (el) => await getBot(el.id, false)))).map((r) => ({ ...r })),
currentPage: page,
totalPage: Math.ceil(Number(count) / (type === 'SEARCH' ? 8 : 16)),
}
Expand Down Expand Up @@ -421,7 +421,7 @@ async function getServerList(type: ListType, page = 1, query?: string): Promise<
}
return {
type,
data: (await Promise.all(res.map(async (el) => await getServer(el.id)))).map((r) => ({ ...r })),
data: (await Promise.all(res.map(async (el) => await getServer(el.id, false)))).map((r) => ({ ...r })),
currentPage: page,
totalPage: Math.ceil(Number(count) / (type === 'SEARCH' ? 8 : 16)),
}
Expand Down

0 comments on commit cfd9400

Please sign in to comment.