From b586031645eb59840c82415dbb96debd94e8c749 Mon Sep 17 00:00:00 2001 From: Linnea Myllynen Date: Wed, 8 Jun 2022 12:56:13 +0300 Subject: [PATCH] Refactoring for fixing a bug --- src/index.js | 2 +- src/taskGroups.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index ad5425a..01f8c13 100644 --- a/src/index.js +++ b/src/index.js @@ -275,7 +275,7 @@ const main = async () => { async (req, res) => { try { // Get user ids from req.body - const userIds = req.body.userIds + const userIds = req.body // Mark the task as completed for all the users const promises = userIds.map((user_guid) => Promise.resolve( diff --git a/src/taskGroups.js b/src/taskGroups.js index 7d2dc1c..b8063b7 100644 --- a/src/taskGroups.js +++ b/src/taskGroups.js @@ -11,7 +11,7 @@ app.post( isGroupLeader, async (req, res) => { try { - const userIds = req.body.userIds + const userIds = req.body const promises = userIds.map((user_guid) => Promise.resolve( postTaskGroupEntry({