diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-04-11 13:19:26 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-04-11 13:19:26 +1000 |
commit | d865528442769b3d5683b75d0872b01da2b5374f (patch) | |
tree | 9b1b18027e31dffbb1e52afaeb8cdea7388dd003 | |
parent | Don't fetch the entire role relation when counting member ids (diff) | |
download | server-d865528442769b3d5683b75d0872b01da2b5374f.tar.xz |
Add erkins note
-rw-r--r-- | src/api/routes/guilds/#guild_id/roles/#role_id/members.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/api/routes/guilds/#guild_id/roles/#role_id/members.ts b/src/api/routes/guilds/#guild_id/roles/#role_id/members.ts index 6b9fad9c..705848aa 100644 --- a/src/api/routes/guilds/#guild_id/roles/#role_id/members.ts +++ b/src/api/routes/guilds/#guild_id/roles/#role_id/members.ts @@ -42,6 +42,7 @@ router.patch( !member.roles.map((role) => role.id).includes(role_id), ); + // TODO (erkin): have a bulk add/remove function that adds the roles in a single txn await Promise.all([ ...add.map((member) => Member.addRole(member.id, guild_id, role_id), |