We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc5b4f9 commit 56de8f9Copy full SHA for 56de8f9
controllers/discordactions.js
@@ -74,11 +74,12 @@ const getAllGroupRoles = async (req, res) => {
74
}, new Set());
75
const groupCreatorsDetails = await retrieveUsers({ userIds: Array.from(groupCreatorIds) });
76
const groupsWithUserDetails = groupsWithMemberCount.map((group) => {
77
+ const groupCreator = groupCreatorsDetails[group.createdBy];
78
return {
79
...group,
- firstName: groupCreatorsDetails[group.createdBy].first_name,
80
- lastName: groupCreatorsDetails[group.createdBy].last_name,
81
- image: groupCreatorsDetails[group.createdBy].picture?.url,
+ firstName: groupCreator.first_name,
+ lastName: groupCreator.last_name,
82
+ image: groupCreator.picture?.url,
83
};
84
});
85
0 commit comments