mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
oRdEr Of OpErAtIoNs
This commit is contained in:
parent
fe49c419f5
commit
2102db2e7c
@ -31,10 +31,10 @@ router.delete("/", route({ permission: "MANAGE_CHANNELS" }), async (req: Request
|
||||
await Channel.removeRecipientFromChannel(channel, req.user_id)
|
||||
} else {
|
||||
await Promise.all([
|
||||
Message.delete({ channel_id: channel_id }),
|
||||
Invite.delete({ channel_id: channel_id }),
|
||||
Recipient.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)
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user