We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45bffdf commit f8653d7Copy full SHA for f8653d7
controllers/tasks.js
@@ -52,12 +52,14 @@ const fetchTasks = async (req, res) => {
52
*/
53
const getUserTasks = async (req, res) => {
54
try {
55
- const statuses = req.query.status
+ const status = req.query.status
56
const { username } = req.params
57
let allTasks = []
58
59
- if (statuses) {
60
- allTasks = await tasks.fetchUserTasks(username, statuses.split(','))
+ if (status) {
+ allTasks = await tasks.fetchUserTasks(username, status)
61
+ } else {
62
+ allTasks = await tasks.fetchUserTasks(username)
63
}
64
65
if (allTasks.userNotFound) {
0 commit comments