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 1adde5ddf1
commit 268699823d

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