Conversation
| emailToLowercase() { | ||
| this.email = this.email.toLowerCase() | ||
| } | ||
|
|
There was a problem hiding this comment.
Shouldnt this be done by the election organizer service class?
There was a problem hiding this comment.
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.
| emailToLowercase() { | ||
| this.email = this.email.toLowerCase() | ||
| } | ||
|
|
There was a problem hiding this comment.
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.
|
Btw, your tests are failing 😺 |
|
The tests fails on date validation on Election, because dates are hardcoded for dates in the past. |
Closes anovote/frontend#169