fix lists not being shown

This commit is contained in:
2019-01-13 00:06:53 +03:00
parent e6309bb6ca
commit 8542be7e78

View File

@@ -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() }) });
}),
);