From a9a1719defefb3f897d3c1e44096c89bf6f48c1a Mon Sep 17 00:00:00 2001 From: Matheus Barbosa Date: Tue, 26 May 2020 08:37:49 -0300 Subject: [PATCH] Update RejectDialogService.js --- src/services/RejectDialogService.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/services/RejectDialogService.js b/src/services/RejectDialogService.js index 1500a77..0f30431 100644 --- a/src/services/RejectDialogService.js +++ b/src/services/RejectDialogService.js @@ -20,9 +20,8 @@ module.exports = async (req, res) => { .send(); const index = dialogue.approvals.indexOf(userId); - if (index > -1) dialogue.approvals = dialogue.approvals.splice(index, 1); - dialogue.approvals = dialogue.approvals.splice(index, 1); - } + + if (index > -1) dialogue.approvals = dialogue.approvals.splice(index, 1); if (dialogue.disapprovals.includes(userId)) return response