-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Codecov Report
@@ Coverage Diff @@
## master #110 +/- ##
=========================================
- Coverage 47.74% 47.3% -0.45%
=========================================
Files 24 24
Lines 1066 1076 +10
Branches 23 23
=========================================
Hits 509 509
- Misses 557 567 +10
Continue to review full report at Codecov.
|
I will leave this for @siemensikkema as he has better overview of what can be re-used for this new piece of functionality. |
@@ -57,6 +59,15 @@ open class APIUserControllerDelegate<U: JWTKeychainUser>: | |||
passwordResetMailer: PasswordResetMailerType | |||
) throws -> ResponseRepresentable { | |||
do { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary newline (?)
@@ -57,6 +59,15 @@ open class APIUserControllerDelegate<U: JWTKeychainUser>: | |||
passwordResetMailer: PasswordResetMailerType | |||
) throws -> ResponseRepresentable { | |||
do { | |||
|
|||
if let json = request.json { | |||
let email: String = try json.get("email") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget but isn't there a constant for the key "email" somewhere?
@@ -87,4 +100,8 @@ extension APIUserControllerDelegate { | |||
func status(_ status: String) -> ResponseRepresentable { | |||
return JSON(["status": .string(status)]) | |||
} | |||
|
|||
enum EmailError: Error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be private?
The email provided to reset password is not checked on valid format