summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-02-04 23:07:43 +0300
committerErkin Alp Güney <erkinalp9035@gmail.com>2022-02-04 23:07:43 +0300
commit1fa1c759e55d3f9e2f933aa7331db5e827dbe367 (patch)
tree3622440465632c2c756c6648891b89b060120dd1 /api
parentsome important changes (diff)
downloadserver-1fa1c759e55d3f9e2f933aa7331db5e827dbe367.tar.xz
ban moderator schema change
Diffstat (limited to 'api')
-rw-r--r--api/src/routes/guilds/#guild_id/bans.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/src/routes/guilds/#guild_id/bans.ts b/api/src/routes/guilds/#guild_id/bans.ts
index 3b943476..8c0bdee6 100644
--- a/api/src/routes/guilds/#guild_id/bans.ts
+++ b/api/src/routes/guilds/#guild_id/bans.ts
@@ -126,6 +126,7 @@ router.delete("/:user_id", route({ permission: "BAN_MEMBERS" }), async (req: Req
 	if (ban.user_id === ban.executor_id) throw DiscordApiErrors.UNKNOWN_BAN;
 	// make self-bans irreversible and hide them from view to avoid victim chasing
 	
+	const banned_user = await User.getPublicUser(banned_user_id);
 	
 	await Promise.all([
 		Ban.delete({