From e11bea21eaa2072061772f2b20a4103eecaf748b Mon Sep 17 00:00:00 2001 From: Spacelord Date: Tue, 6 Jun 2023 23:02:19 +0200 Subject: [PATCH] Fixed default route --- src/routes/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/index.ts b/src/routes/index.ts index 8a20a90..1ef45b3 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -16,9 +16,9 @@ Router.use('/', frontend_routes); Router.all('*', function (req, res) { // TODO: Respond based on content-type (with req.is('application/json')) if (req.is('application/json')) { - res.status(418)//.json({ errorcode: '404' }); + res.status(404).json({ errorcode: 'NOT_FOUND', error: 'Not Found!' }); } else { - res.status(418)//.render(__path + '/src/frontend/errors/404.eta.html', { url: req.originalUrl }); + res.status(404).render(__path + '/src/frontend/errors/404.eta.html', { url: req.originalUrl }); } });