summary refs log tree commit diff
path: root/api/src/routes/guilds/#guild_id
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-13 12:22:59 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-13 12:22:59 +0200
commit9429c5c09ab1b7ce081c0786e080da4ee78ad22c (patch)
tree60753f7209271c2096505530624258e9daad276e /api/src/routes/guilds/#guild_id
parent:bug: fix relationship (diff)
downloadserver-9429c5c09ab1b7ce081c0786e080da4ee78ad22c.tar.xz
:bug: fix In() query
Diffstat (limited to 'api/src/routes/guilds/#guild_id')
-rw-r--r--api/src/routes/guilds/#guild_id/roles.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/guilds/#guild_id/roles.ts b/api/src/routes/guilds/#guild_id/roles.ts
index 6b2902d9..5c549262 100644
--- a/api/src/routes/guilds/#guild_id/roles.ts
+++ b/api/src/routes/guilds/#guild_id/roles.ts
@@ -132,7 +132,7 @@ router.patch("/", route({ body: "RolePositionUpdateSchema" }), async (req: Reque
 
 	await Promise.all(body.map(async (x) => Role.update({ guild_id, id: x.id }, { position: x.position })));
 
-	const roles = await Role.find({ guild_id, id: In(body.map((x) => x.id)) });
+	const roles = await Role.find({ where: body.map((x) => ({ id: x.id, guild_id })) });
 
 	await Promise.all(
 		roles.map((x) =>