Skip to content

Commit 3ffc3bf

Browse files
authored
Merge pull request #395 from bhk31/website-backend-368
Check for status in task/:username API
2 parents b023b38 + c155e6c commit 3ffc3bf

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
@@ -57,7 +57,7 @@ const getUserTasks = async (req, res) => {
5757
const { username } = req.params
5858
let allTasks = []
5959

60-
if (!Object.values(TASK_STATUS).includes(status)) {
60+
if (status && !Object.values(TASK_STATUS).includes(status)) {
6161
return res.boom.notFound('Status not found!')
6262
}
6363

0 commit comments

Comments
 (0)