From 85052491c0d1e72d70e70bd3b4d027b6f6eaa2e9 Mon Sep 17 00:00:00 2001 From: Yash Kumar Verma Date: Fri, 29 May 2020 19:46:11 +0530 Subject: [PATCH] Fixes #180, allow listing urls in group --- src/routes/api/url.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/routes/api/url.ts b/src/routes/api/url.ts index bd5a280..909c237 100644 --- a/src/routes/api/url.ts +++ b/src/routes/api/url.ts @@ -10,16 +10,13 @@ import { optsFromGroupedShortcode } from '../../utils/shortener' export const route = Router() -route.get('/:code', async (req, res) => { +route.get('/:code', async (req, res, next) => { try { const url = await findUrlByShortcode(req.params.code) res.json(url) } catch (err) { - Raven.captureException(err) - res.status(404).json({ - error: err.message, - }) + next() } })