summary refs log tree commit diff
path: root/api/src/routes/channels
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-18 22:55:36 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-18 22:55:36 +0200
commit2a85285e63ddfd1f67b55ebabd6055037823377c (patch)
treee322c5558532b36a9d1cec188ae0308effe2d87e /api/src/routes/channels
parentMerge branch 'master' of http://github.com/fosscord/fosscord-server (diff)
downloadserver-2a85285e63ddfd1f67b55ebabd6055037823377c.tar.xz
:bug: fix bulk delete
Diffstat (limited to 'api/src/routes/channels')
-rw-r--r--api/src/routes/channels/#channel_id/messages/bulk-delete.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/bulk-delete.ts b/api/src/routes/channels/#channel_id/messages/bulk-delete.ts
index a0fe7cc0..7a711cb0 100644
--- a/api/src/routes/channels/#channel_id/messages/bulk-delete.ts
+++ b/api/src/routes/channels/#channel_id/messages/bulk-delete.ts
@@ -29,7 +29,7 @@ router.post("/", route({ body: "BulkDeleteSchema" }), async (req: Request, res:
 	if (messages.length < 2) throw new HTTPError("You must at least specify 2 messages to bulk delete");
 	if (messages.length > maxBulkDelete) throw new HTTPError(`You cannot delete more than ${maxBulkDelete} messages`);
 
-	await Message.delete({ id: In(messages) });
+	await Message.delete(messages.map((x) => ({ id: x })));
 
 	await emitEvent({
 		event: "MESSAGE_DELETE_BULK",