Skip to content

Hotfix/email case sense#146

Merged
freshfish70 merged 3 commits intodevelopfrom
hotfix/email-case-sense
Apr 5, 2021
Merged

Hotfix/email case sense#146
freshfish70 merged 3 commits intodevelopfrom
hotfix/email-case-sense

Conversation

@freshfish70
Copy link
Copy Markdown
Member

@freshfish70 freshfish70 added the bug This is a bug label Apr 1, 2021
Comment on lines +24 to +27
emailToLowercase() {
this.email = this.email.toLowerCase()
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldnt this be done by the election organizer service class?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No, not really. Either the entity itself should make sure the values are saved correctly, or if we have a persistence layer/repository, that's more appropriate than the service layer. At least, that's what I think. Otherwise, the service layer does a lot of very specific things.

Comment thread src/models/EligibleVoter/EligibleVoterEntity.ts
Comment on lines +24 to +27
emailToLowercase() {
this.email = this.email.toLowerCase()
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No, not really. Either the entity itself should make sure the values are saved correctly, or if we have a persistence layer/repository, that's more appropriate than the service layer. At least, that's what I think. Otherwise, the service layer does a lot of very specific things.

@sanderhurlen
Copy link
Copy Markdown
Contributor

Btw, your tests are failing 😺

@freshfish70
Copy link
Copy Markdown
Member Author

The tests fails on date validation on Election, because dates are hardcoded for dates in the past.
A fix was made in the join branch

@freshfish70 freshfish70 merged commit c9612fa into develop Apr 5, 2021
@freshfish70 freshfish70 deleted the hotfix/email-case-sense branch April 5, 2021 12:14
@sanderhurlen sanderhurlen added this to the Sprint 12 milestone Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This is a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Email voter submits should not be case-sensitive

3 participants