remove pretense of nonexistence from main view route for now to make it compile while thinking of a fix

This commit is contained in:
Erkin Alp Güney 2022-02-04 08:49:28 +03:00 committed by GitHub
parent 3e0f568ba4
commit 57057c8711

View File

@ -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;