diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-20 18:33:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-20 18:33:33 +0200 |
commit | d44983b794f6402ecd3b5015c1b741f06e9d8b22 (patch) | |
tree | 38f774cfae5f41b831d043c6e46855ec14e2ad15 /api/src/routes/channels | |
parent | oRdEr Of OpErAtIoNs (diff) | |
download | server-d44983b794f6402ecd3b5015c1b741f06e9d8b22.tar.xz |
Update index.ts
Diffstat (limited to 'api/src/routes/channels')
-rw-r--r-- | api/src/routes/channels/#channel_id/index.ts | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/api/src/routes/channels/#channel_id/index.ts b/api/src/routes/channels/#channel_id/index.ts index dcbf6d4e..fde75ec9 100644 --- a/api/src/routes/channels/#channel_id/index.ts +++ b/api/src/routes/channels/#channel_id/index.ts @@ -1,4 +1,4 @@ -import { Channel, Message, Invite, ReadState, ChannelDeleteEvent, ChannelPermissionOverwriteType, ChannelType, ChannelUpdateEvent, emitEvent, Recipient } from "@fosscord/util"; +import { Channel, ChannelDeleteEvent, ChannelPermissionOverwriteType, ChannelType, ChannelUpdateEvent, emitEvent, Recipient } from "@fosscord/util"; import { Request, Response, Router } from "express"; import { handleFile, route } from "@fosscord/api"; @@ -31,10 +31,6 @@ router.delete("/", route({ permission: "MANAGE_CHANNELS" }), async (req: Request await Channel.removeRecipientFromChannel(channel, req.user_id) } else { await Promise.all([ - Invite.delete({ channel_id: channel_id }), - ReadState.delete({ channel_id: channel_id }), - Message.delete({ channel_id: channel_id }), - Recipient.delete({ channel_id: channel_id }), Channel.delete({ id: channel_id }), emitEvent({ event: "CHANNEL_DELETE", data: channel, channel_id } as ChannelDeleteEvent) ]); |