From 81c44a0c77e136ef44df2fc775119a4fad26a1e8 Mon Sep 17 00:00:00 2001 From: TomatoCake <60300461+DEVTomatoCake@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:40:06 +0200 Subject: [PATCH] Fix ?before messages fetch param --- src/api/routes/channels/#channel_id/messages/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/routes/channels/#channel_id/messages/index.ts b/src/api/routes/channels/#channel_id/messages/index.ts index d4635b1d..db46aff7 100644 --- a/src/api/routes/channels/#channel_id/messages/index.ts +++ b/src/api/routes/channels/#channel_id/messages/index.ts @@ -157,6 +157,7 @@ router.get( if (BigInt(after) > BigInt(Snowflake.generate())) return res.status(422); query.where.id = MoreThan(after); + query.order = { timestamp: "ASC" }; } else if (before) { if (BigInt(before) > BigInt(Snowflake.generate())) return res.status(422);