Skip to content

Commit 56de8f9

Browse files
committed
PR comment fix
1 parent dc5b4f9 commit 56de8f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

controllers/discordactions.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ const getAllGroupRoles = async (req, res) => {
7474
}, new Set());
7575
const groupCreatorsDetails = await retrieveUsers({ userIds: Array.from(groupCreatorIds) });
7676
const groupsWithUserDetails = groupsWithMemberCount.map((group) => {
77+
const groupCreator = groupCreatorsDetails[group.createdBy];
7778
return {
7879
...group,
79-
firstName: groupCreatorsDetails[group.createdBy].first_name,
80-
lastName: groupCreatorsDetails[group.createdBy].last_name,
81-
image: groupCreatorsDetails[group.createdBy].picture?.url,
80+
firstName: groupCreator.first_name,
81+
lastName: groupCreator.last_name,
82+
image: groupCreator.picture?.url,
8283
};
8384
});
8485

0 commit comments

Comments
 (0)