summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-20 18:33:33 +0200
committerGitHub <noreply@github.com>2021-09-20 18:33:33 +0200
commitd44983b794f6402ecd3b5015c1b741f06e9d8b22 (patch)
tree38f774cfae5f41b831d043c6e46855ec14e2ad15
parentoRdEr Of OpErAtIoNs (diff)
downloadserver-d44983b794f6402ecd3b5015c1b741f06e9d8b22.tar.xz
Update index.ts
Diffstat (limited to '')
-rw-r--r--api/src/routes/channels/#channel_id/index.ts6
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)
 		]);