diff --git a/src/services/ApprovalDialogService.js b/src/services/ApprovalDialogService.js index a6d9b51..2981f3d 100644 --- a/src/services/ApprovalDialogService.js +++ b/src/services/ApprovalDialogService.js @@ -20,8 +20,8 @@ module.exports = async (req, res) => { .send(); const index = dialogue.disapprovals.indexOf(userId); - if (index > -1) - dialogue.disapprovals = dialogue.disapprovals.splice(index, 1); + + if (index > -1) dialogue.disapprovals.splice(index, 1); if (dialogue.approvals.includes(userId)) return response diff --git a/src/services/RejectDialogService.js b/src/services/RejectDialogService.js index 0f30431..1f2d510 100644 --- a/src/services/RejectDialogService.js +++ b/src/services/RejectDialogService.js @@ -20,8 +20,8 @@ module.exports = async (req, res) => { .send(); const index = dialogue.approvals.indexOf(userId); - - if (index > -1) dialogue.approvals = dialogue.approvals.splice(index, 1); + + if (index > -1) dialogue.approvals.splice(index, 1); if (dialogue.disapprovals.includes(userId)) return response