Skip to content

Commit

Permalink
Update ownedServers filter
Browse files Browse the repository at this point in the history
  • Loading branch information
chimpdev committed Apr 8, 2024
1 parent ffcc1c2 commit 503efa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/routes/profiles/[slug]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
const publiclySafe = await profile.toPubliclySafe();
Object.assign(publiclySafe, { permissions, isLiked });

const ownedServers = request?.user ? client.guilds.cache.filter(({ ownerId }) => ownerId === request.user.id) : [];
const ownedServers = client.guilds.cache.filter(({ ownerId }) => ownerId === profile.user.id);
if (ownedServers.size > 0) {
const listedServers = randomizeArray(await Server.find({ id: { $in: ownedServers.map(({ id }) => id) } })).slice(0, 3);

Expand Down

0 comments on commit 503efa1

Please sign in to comment.