mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
fix: Correct get tasks route to properly get todos (#7349)
This commit is contained in:
committed by
Matteo Pagliazzi
parent
73dd9f5920
commit
93d50e4f60
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user