[call-me] - ops

This commit is contained in:
Miroslav Pejic
2024-09-21 21:05:38 +02:00
parent bba98d4658
commit 170c665640
+5 -5
View File
@@ -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' });