Skip to content

Commit

Permalink
Merge pull request #17078 from tienifr/fix/issue-15048
Browse files Browse the repository at this point in the history
Fix/15048: Add successData into DeleteMembersFromWorkspace API
  • Loading branch information
grgia authored Apr 10, 2023
2 parents 71b6b1a + 80d7bb3 commit f3f0e37
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ function removeMembers(members, policyID) {
key: membersListKey,
value: _.object(members, Array(members.length).fill({pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE})),
}];
const successData = [{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: membersListKey,
value: _.object(members, Array(members.length).fill(null)),
}];
const failureData = [{
onyxMethod: CONST.ONYX.METHOD.MERGE,
key: membersListKey,
Expand All @@ -219,7 +224,7 @@ function removeMembers(members, policyID) {
API.write('DeleteMembersFromWorkspace', {
emailList: members.join(','),
policyID,
}, {optimisticData, failureData});
}, {optimisticData, successData, failureData});
}

/**
Expand Down

0 comments on commit f3f0e37

Please sign in to comment.