mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-05 12:55:43 +00:00
Fix before and after queries doing gt and lt comparisions incorrectly
This commit is contained in:
@@ -109,11 +109,11 @@ router.get("/", async (req: Request, res: Response) => {
|
||||
};
|
||||
|
||||
if (after) {
|
||||
if (after > Snowflake.generate()) return res.status(422);
|
||||
if (BigInt(after) > BigInt(Snowflake.generate())) return res.status(422);
|
||||
query.where.id = MoreThan(after);
|
||||
}
|
||||
else if (before) {
|
||||
if (before < req.params.channel_id) return res.status(422);
|
||||
if (BigInt(before) < BigInt(req.params.channel_id)) return res.status(422);
|
||||
query.where.id = LessThan(before);
|
||||
}
|
||||
else if (around) {
|
||||
|
||||
Reference in New Issue
Block a user