Skip to content

Commit c155e6c

Browse files
committed
add checck for status
1 parent 9322b5b commit c155e6c

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 (status !== undefined && !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)