summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-11 13:19:26 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-11 13:19:26 +1000
commitd865528442769b3d5683b75d0872b01da2b5374f (patch)
tree9b1b18027e31dffbb1e52afaeb8cdea7388dd003 /src/api
parentDon't fetch the entire role relation when counting member ids (diff)
downloadserver-d865528442769b3d5683b75d0872b01da2b5374f.tar.xz
Add erkins note
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/guilds/#guild_id/roles/#role_id/members.ts1
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),