diff --git a/server/routes/api/posts.js b/server/routes/api/posts.js index e21795a..835529a 100644 --- a/server/routes/api/posts.js +++ b/server/routes/api/posts.js @@ -37,7 +37,10 @@ routes.set('', async (req, res) => { if (req.query.sort === '1') res.send(posts_sorted) else res.send(posts_sorted.reverse()) + return } + // Default response when there are no interesting queries + res.send(posts) }) routes.set('/:id', async (req, res) => {