diff options
author | Erkin Alp Güney <erkinalp9035@gmail.com> | 2022-02-04 08:49:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 08:49:28 +0300 |
commit | 9c941284ea188353846fbb21469b5b972073866c (patch) | |
tree | 2c0ff70600076553f2d9b59404c7e8dfe561268c | |
parent | Extend the pretense of non-existence of self-bans to API view route too (diff) | |
download | server-9c941284ea188353846fbb21469b5b972073866c.tar.xz |
remove pretense of nonexistence from main view route for now to make it compile while thinking of a fix
-rw-r--r-- | api/src/routes/guilds/#guild_id/bans.ts | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/api/src/routes/guilds/#guild_id/bans.ts b/api/src/routes/guilds/#guild_id/bans.ts index 5a425680..c73cc3e6 100644 --- a/api/src/routes/guilds/#guild_id/bans.ts +++ b/api/src/routes/guilds/#guild_id/bans.ts @@ -27,8 +27,6 @@ router.get("/", route({ permission: "BAN_MEMBERS" }), async (req: Request, res: let bans = await Ban.find({ guild_id: guild_id }); /* Filter secret from database registry.*/ - if (banned_user.user_id === banned_user.executor_id) throw DiscordApiErrors.UNKNOWN_BAN; - // hide self-bans from view to prevent victim chasing bans.forEach((registry: BanRegistrySchema) => { delete registry.ip; |