diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-13 01:11:03 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-13 01:11:03 +0200 |
commit | 07ba78d391ac517225d3afa537d7eb4f7b13c74d (patch) | |
tree | 82d127530d0d837ad1fdf2ef7b76eda122257bcc /api/src/routes/channels/#channel_id | |
parent | :bug: fix channel events + message send (diff) | |
download | server-07ba78d391ac517225d3afa537d7eb4f7b13c74d.tar.xz |
:bug: fix dm #321
Diffstat (limited to 'api/src/routes/channels/#channel_id')
-rw-r--r-- | api/src/routes/channels/#channel_id/permissions.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/channels/#channel_id/permissions.ts b/api/src/routes/channels/#channel_id/permissions.ts index 827e46f2..959ab8e0 100644 --- a/api/src/routes/channels/#channel_id/permissions.ts +++ b/api/src/routes/channels/#channel_id/permissions.ts @@ -35,7 +35,7 @@ router.put( allow: body.allow, deny: body.deny }; - channel.permission_overwrites.push(overwrite); + channel.permission_overwrites!.push(overwrite); } overwrite.allow = body.allow; overwrite.deny = body.deny; @@ -60,7 +60,7 @@ router.delete("/:overwrite_id", route({ permission: "MANAGE_ROLES" }), async (re const channel = await Channel.findOneOrFail({ id: channel_id }); if (!channel.guild_id) throw new HTTPError("Channel not found", 404); - channel.permission_overwrites = channel.permission_overwrites.filter((x) => x.id === overwrite_id); + channel.permission_overwrites = channel.permission_overwrites!.filter((x) => x.id === overwrite_id); await Promise.all([ channel.save(), |