summary refs log tree commit diff
path: root/api/src/routes/channels/#channel_id
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
commit0def560d113f6d2356360041e92346dc4faa17b0 (patch)
treec672cb853e3a6001c50a7b50a94d0d75ff11c5f4 /api/src/routes/channels/#channel_id
parentMerge branch 'master' of http://github.com/fosscord/fosscord-server (diff)
downloadserver-0def560d113f6d2356360041e92346dc4faa17b0.tar.xz
:bug: fix bulk delete
Diffstat (limited to 'api/src/routes/channels/#channel_id')
-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",