1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-23 02:42:28 +01:00

...try again

This commit is contained in:
Madeline 2022-09-02 21:17:52 +10:00
parent d6770d8917
commit f7de3c6c0f
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

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(