1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 18:32:29 +01:00

...try again

This commit is contained in:
Madeline 2022-09-02 21:17:52 +10:00
parent 0d43bb0afa
commit a599e1ac57

View File

@ -123,15 +123,11 @@ router.get("/", async (req: Request, res: Response) => {
MoreThan((BigInt(around) - BigInt(halfLimit)).toString()),
LessThan((BigInt(around) + BigInt(halfLimit)).toString())
];
}
let messages;
try {
messages = await Message.find(query);
}
catch (e) {
return res.json([]);
}
const messages = await Message.find(query);
const endpoint = Config.get().cdn.endpointPublic;
return res.json(