From 8542be7e78c975bcb2675f5756cb2f9d34166647 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Sun, 13 Jan 2019 00:06:53 +0300 Subject: [PATCH] fix lists not being shown --- routes/lists.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/lists.js b/routes/lists.js index 987b054..7560ea1 100644 --- a/routes/lists.js +++ b/routes/lists.js @@ -15,7 +15,7 @@ router.get( const lists = await TodoList.find({ user: req.user.id }) .populate('todos') .exec(); - res.json({ success: true, data: lists.map(list => { list.todos.reverse(); list.toJson() }) }); + res.json({ success: true, data: lists.map(list => { list.todos.reverse(); return list.toJson() }) }); }), );