Skip to content

Commit

Permalink
fix (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
PiaDue authored Feb 1, 2024
1 parent 4b73a27 commit 760c247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Backend/controllers/goalController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export async function updateGoal(req, res, next) {
updatedData.description = updatedData.description.replace(/\n/g, '<br>'); //makes multiline description possible
}

const updatedGoal = await RoadmapGoal.findByIdAndUpdate(goalId, updatedData, { new: true }).populate('subGoals');
const updatedGoal = await RoadmapGoal.findByIdAndUpdate(goalId, updatedData, { new: true }).populate('subGoals').populate('comments')
if (!updatedGoal) {
return res.status(404).json({ error: 'Goal not found' });
}
Expand Down

0 comments on commit 760c247

Please sign in to comment.