diff --git a/src/server/admin/teams/controllers/add/add-member.js b/src/server/admin/teams/controllers/add/add-member.js index cd546e73..f6e24a77 100644 --- a/src/server/admin/teams/controllers/add/add-member.js +++ b/src/server/admin/teams/controllers/add/add-member.js @@ -88,9 +88,7 @@ const addMemberController = { request.yar.flash( sessionNames.globalValidationFailures, - rejectedResponse.map( - (rejectedResponse) => rejectedResponse.reason.message - ) + rejectedResponse.map((response) => response.reason.message) ) return h.redirect('/admin/teams/' + teamId + '/add-member' + queryString) diff --git a/src/server/teams/controllers/add/add-member.js b/src/server/teams/controllers/add/add-member.js index 3e6a585c..a45d88e7 100644 --- a/src/server/teams/controllers/add/add-member.js +++ b/src/server/teams/controllers/add/add-member.js @@ -53,8 +53,8 @@ const addMemberController = { } if (!validationResult.error) { - const addUserToTeamPromises = userIds.map( - async (userId) => await addMemberToTeam(request, teamId, userId) + const addUserToTeamPromises = userIds.map((userId) => + addMemberToTeam(request, teamId, userId) ) const responses = await Promise.allSettled(addUserToTeamPromises) @@ -88,9 +88,7 @@ const addMemberController = { request.yar.flash( sessionNames.globalValidationFailures, - rejectedResponse.map( - (rejectedResponse) => rejectedResponse.reason.message - ) + rejectedResponse.map((response) => response.reason.message) ) return h.redirect('/teams/' + teamId + '/add-member' + queryString)