1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-20 09:41:35 +02:00

Fix messages?after=snowflake calling new Snowflake, which is not allwoed

This commit is contained in:
Madeline 2022-08-02 19:10:34 +10:00
parent 11d57df801
commit d1e3640157
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -109,7 +109,7 @@ router.get("/", async (req: Request, res: Response) => {
};
if (after) {
if (after > new Snowflake()) return res.status(422);
if (after > Snowflake.generate()) return res.status(422);
query.where.id = MoreThan(after);
}
else if (before) {