diff --git a/server/routers/todo/comment.js b/server/routers/todo/comment.js index c4ebbf0..a6e5b4e 100644 --- a/server/routers/todo/comment.js +++ b/server/routers/todo/comment.js @@ -42,7 +42,7 @@ router.get('/:todoId/:itemId', async (req, res) => { return res.send(getAnswer(new Error('no such todo'))) } - const item = await ItemModel.findById(itemId).populate('comments').exec() + const item = await ItemModel.findById(itemId).populate({ path: 'comments', populate: { path: 'author' } }).exec() if (!item) { return res.send(getAnswer(new Error('no such item'))) }