summary refs log tree commit diff
path: root/api/src/routes
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-19 18:46:22 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-19 18:46:22 +0200
commit994406e5cea886444838ce71c4aaee46663be1a9 (patch)
treed62af02685a633ab4e974b21dce21e8264f8eaa3 /api/src/routes
parent:bug: fix bundle debug (diff)
downloadserver-994406e5cea886444838ce71c4aaee46663be1a9.tar.xz
:art: remove deleteMessageAttachments and move to entity
Diffstat (limited to '')
-rw-r--r--api/src/routes/channels/#channel_id/messages/#message_id/index.ts3
1 files changed, 0 insertions, 3 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/#message_id/index.ts b/api/src/routes/channels/#channel_id/messages/#message_id/index.ts

index b5220fab..7f7de264 100644 --- a/api/src/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/api/src/routes/channels/#channel_id/messages/#message_id/index.ts
@@ -3,7 +3,6 @@ import { Router, Response, Request } from "express"; import { route } from "@fosscord/api"; import { handleMessage, postHandleMessage } from "@fosscord/api"; import { MessageCreateSchema } from "../index"; -import { deleteMessageAttachments } from "@fosscord/api/util/Attachments"; const router = Router(); // TODO: message content/embed string length limit @@ -34,7 +33,6 @@ router.patch("/", route({ body: "MessageCreateSchema", permission: "SEND_MESSAGE }); await Promise.all([ - await deleteMessageAttachments(message_id, new_message.attachments), //This delete all the attachments not in the array new_message!.save(), await emitEvent({ event: "MESSAGE_UPDATE", @@ -60,7 +58,6 @@ router.delete("/", route({}), async (req: Request, res: Response) => { permission.hasThrow("MANAGE_MESSAGES"); } - await deleteMessageAttachments(message_id); await Message.delete({ id: message_id }); await emitEvent({