fix: Correct get tasks route to properly get todos (#7349)

This commit is contained in:
Blade Barringer
2016-05-18 09:54:02 -05:00
committed by Matteo Pagliazzi
parent 73dd9f5920
commit 93d50e4f60
2 changed files with 48 additions and 5 deletions

View File

@@ -121,6 +121,7 @@ async function _getTasks (req, res, user, challenge) {
if (type) {
if (type === 'todos') {
query.completed = false; // Exclude completed todos
query.type = 'todo';
} else if (type === 'completedTodos') {
query = Tasks.Task.find({
userId: user._id,