Skip to content

Commit

Permalink
Merge pull request #1156 from DEVTomatoCake/fix/messages-before-param
Browse files Browse the repository at this point in the history
Fix ?after messages fetch param
  • Loading branch information
Puyodead1 authored Jul 28, 2024
2 parents b575564 + bc3a3ad commit 289a02f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/api/routes/channels/#channel_id/messages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 289a02f

Please sign in to comment.