Skip to content

Commit

Permalink
fix: do not fetch full user data on fetchServerOwners
Browse files Browse the repository at this point in the history
  • Loading branch information
skinmaker1345 committed Oct 19, 2024
1 parent 1238fe0 commit 09187e3
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 @@ -184,8 +184,8 @@ async function fetchServerOwners(id: string): Promise<User[] | null> {
const data = await getServerData(id)
return data
? [
await get._rawUser.load(data.owner),
...(await Promise.all(data.admins.map((el) => get._rawUser.load(el)))),
await get.user.load(data.owner),
...(await Promise.all(data.admins.map((el) => get.user.load(el)))),
].filter((el) => el)
: null
}
Expand Down

0 comments on commit 09187e3

Please sign in to comment.