Skip to content

Commit 06180a4

Browse files
committed
return filter task in array of object
1 parent d77bfd8 commit 06180a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ const fetchTasks = async (req, res) => {
143143
const tasksWithRdsAssigneeInfo = await fetchTasksWithRdsAssigneeInfo(filterTasks);
144144
return res.json({
145145
message: "Filter tasks returned successfully!",
146-
...tasksWithRdsAssigneeInfo,
146+
tasks: tasksWithRdsAssigneeInfo.length > 0 ? tasksWithRdsAssigneeInfo : [],
147147
});
148148
}
149149

0 commit comments

Comments
 (0)