diff --git a/server/routers/todo/routes.js b/server/routers/todo/routes.js index 8ae99d7..cf2139f 100644 --- a/server/routers/todo/routes.js +++ b/server/routers/todo/routes.js @@ -21,4 +21,14 @@ router.post('/', requiredValidate('title'), async (req, res) => { res.send(getAnswer(null, list)) }) +router.get('/list', async (req, res) => { + const items = await ListModel + .find({}) + .populate('items') + .exec() + + res.send(getAnswer(null, items)) +}) + + module.exports = router