summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorTomatoCake <60300461+DEVTomatoCake@users.noreply.github.com>2024-07-28 21:40:06 +0200
committerTomatoCake <60300461+DEVTomatoCake@users.noreply.github.com>2024-07-28 21:40:06 +0200
commit81c44a0c77e136ef44df2fc775119a4fad26a1e8 (patch)
tree697ffe62dddf64e112c6859f1a2e2d32127ccb25 /src/api
parentFix sort order when using ?around (diff)
downloadserver-ts-81c44a0c77e136ef44df2fc775119a4fad26a1e8.tar.xz
Fix ?before messages fetch param
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/channels/#channel_id/messages/index.ts1
1 files changed, 1 insertions, 0 deletions
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);