summary refs log tree commit diff
path: root/api/src/routes/guilds/#guild_id/prune.ts
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/routes/guilds/#guild_id/prune.ts')
-rw-r--r--api/src/routes/guilds/#guild_id/prune.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/guilds/#guild_id/prune.ts b/api/src/routes/guilds/#guild_id/prune.ts
index efaad580..01f18ce4 100644
--- a/api/src/routes/guilds/#guild_id/prune.ts
+++ b/api/src/routes/guilds/#guild_id/prune.ts
@@ -33,7 +33,7 @@ export const inactiveMembers = async (guild_id: string, user_id: string, days: n
 	//I'm sure I can do this in the above db query ( and it would probably be better to do so ), but oh well.
 	if (roles.length && members.length) members = members.filter((user) => user.roles?.some((role) => roles.includes(role.id)));
 
-	const me = await Member.findOneOrFail({ id: user_id, guild_id }, { relations: ["roles"] });
+	const me = await Member.findOneOrFail({ where: { id: user_id, guild_id }, relations: ["roles"] });
 	const myHighestRole = Math.max(...(me.roles?.map((x) => x.position) || []));
 
 	const guild = await Guild.findOneOrFail({ where: { id: guild_id } });