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

Fix ?before messages fetch param

This commit is contained in:
TomatoCake 2024-07-28 21:40:06 +02:00
parent 481cf38373
commit 81c44a0c77

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