diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/src/routes/channels/#channel_id/messages/index.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts index fc0f88bb..1faf9a3b 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -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( |