1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-25 11:43:07 +01:00

Merge pull request #1156 from DEVTomatoCake/fix/messages-before-param

Fix ?after messages fetch param
This commit is contained in:
Puyodead1 2024-07-28 17:02:51 -04:00 committed by GitHub
commit 289a02fe10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);