Skip to content

Feature/add submit vote checks#150

Merged
perkynades merged 12 commits intodevelopfrom
feature/add-submit-vote-checks
Apr 9, 2021
Merged

Feature/add submit vote checks#150
perkynades merged 12 commits intodevelopfrom
feature/add-submit-vote-checks

Conversation

@perkynades
Copy link
Copy Markdown
Contributor

These checks for when a vote is submitted has been added:

  • If the ballot being voted on exists
  • If the ballot being voted on is connected to an election
  • If the election is open
  • If the candidate being voted on exists

If there are any checks that you feel are missing, please comment :D

Closes #140

@perkynades perkynades added this to the Sprint 13 milestone Apr 7, 2021
Comment thread src/services/VoteService.ts Outdated
Comment thread tests/helpers/seed/election.ts
Copy link
Copy Markdown
Contributor

@sanderhurlen sanderhurlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, this is a mouthful issue 🌞 I believe you should refactor the voteChecks a little bit. That's only for clarity!
I do believe @freshfish70 has a good point on the "vote search".

Comment thread src/services/VoteService.ts Outdated
Comment thread src/services/VoteService.ts Outdated
Comment thread src/services/VoteService.ts Outdated
Comment thread src/services/VoteService.ts Outdated
@perkynades perkynades requested a review from sanderhurlen April 9, 2021 12:17
Copy link
Copy Markdown
Contributor

@spiftire spiftire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor things. Looks good. Not tested

Comment thread tests/services/VoteService.test.ts Outdated
Comment thread src/services/VoteService.ts Outdated
Comment thread src/lib/voting/VoteValidator.ts Outdated
@perkynades perkynades merged commit 44cc80a into develop Apr 9, 2021
@perkynades perkynades deleted the feature/add-submit-vote-checks branch April 9, 2021 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add more checks when a vote is a submitted

4 participants