Skip to content

Commit

Permalink
fix(#23): remove user from your last review list
Browse files Browse the repository at this point in the history
  • Loading branch information
barbosa committed May 26, 2020
1 parent a9a1719 commit 92bb18a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/services/ApprovalDialogService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/services/RejectDialogService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 92bb18a

Please sign in to comment.