Skip to content

Commit 3a3cb0b

Browse files
authored
Include task with subtasks (#907)
1 parent 6812627 commit 3a3cb0b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backend/modules/tasks/routes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const {
5151
handleParentChildOnStatusChange,
5252
} = require('./operations/parent-child');
5353
const {
54-
TASK_INCLUDES,
5554
TASK_INCLUDES_WITH_SUBTASKS,
5655
} = require('./utils/constants');
5756

@@ -374,7 +373,7 @@ router.post('/task', async (req, res) => {
374373
await createSubtasks(task.id, subtasks, req.currentUser.id);
375374

376375
const taskWithAssociations = await taskRepository.findById(task.id, {
377-
include: TASK_INCLUDES,
376+
include: TASK_INCLUDES_WITH_SUBTASKS,
378377
});
379378

380379
if (!taskWithAssociations) {
@@ -725,7 +724,7 @@ router.patch('/task/:uid', requireTaskWriteAccess, async (req, res) => {
725724
);
726725

727726
const taskWithAssociations = await taskRepository.findById(task.id, {
728-
include: TASK_INCLUDES,
727+
include: TASK_INCLUDES_WITH_SUBTASKS,
729728
});
730729

731730
const serializedTask = await serializeTask(

0 commit comments

Comments
 (0)