Skip to content

Commit 4b15ee6

Browse files
committed
add checck for status
1 parent c6f856d commit 4b15ee6

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)