Skip to content

Commit

Permalink
fix(api-gql): correctly mutate roles in stats check
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed Jan 25, 2025
1 parent 912d1ed commit b8db7d2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func (c *Directives) HasChannelRolesDashboardPermission(
model.ChannelRoleTypeSubscriber: userStat.IsSubscriber,
}

for _, role := range channelRoles {
for i, role := range channelRoles {
if roleToStats[role.Type] {
role.Users = append(
channelRoles[i].Users = append(
role.Users,
&model.ChannelRoleUser{
ID: "", // not needed
Expand Down

0 comments on commit b8db7d2

Please sign in to comment.