todo list get list
This commit is contained in:
parent
fb644b6f7b
commit
9fb4219418
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user