From f7de3c6c0fa945e54cbecb6ecd09ac8c281abaf9 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 2 Sep 2022 21:17:52 +1000 Subject: ...try again --- api/src/routes/channels/#channel_id/messages/index.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'api/src/routes') 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( -- cgit 1.5.1