diff --git a/app/server.js b/app/server.js index a359117..cf55835 100755 --- a/app/server.js +++ b/app/server.js @@ -132,11 +132,6 @@ app.get('/join/', (req, res) => { return notFound(res); }); -// Page not found -app.get('*', (req, res) => { - return notFound(res); -}); - // Axios API requests app.get(`${config.apiBasePath}/users`, (req, res) => { // check if user is authorized for the API call @@ -154,6 +149,11 @@ app.get(`${config.apiBasePath}/users`, (req, res) => { return res.json({ users }); }); +// Page not found +app.get('*', (req, res) => { + return notFound(res); +}); + // Page not found function notFound(res) { res.json({ data: '404 not found' });