comments
This commit is contained in:
@@ -51,7 +51,10 @@ router.post('/item', requiredValidate('todoId', 'title'), async (req, res) => {
|
||||
router.get('/:todoId', async (req, res) => {
|
||||
const { todoId } = req.params
|
||||
|
||||
const list = await ListModel.findById(todoId).populate('items').exec()
|
||||
const list = await ListModel
|
||||
.findById(todoId)
|
||||
.populate('items')
|
||||
.exec()
|
||||
|
||||
if (!list) {
|
||||
throw new Error('list not found')
|
||||
|
||||
Reference in New Issue
Block a user