todo list get list

This commit is contained in:
Primakov Alexandr Alexandrovich 2025-01-18 16:52:10 +03:00
parent fb644b6f7b
commit 9fb4219418

View File

@ -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