-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: cleaner view code for many endpoints (#81)
* chore: add resend confirmation mail endpoint to bruno project * fix: remove internal error from response message in unhandled exception handler. * refactor: remove unneeded complexity from ResendAccountSerializer * refactor: simplified ResendAccountConfirmationView * refactor: simplified Login endpoints * refactor: removed unused custom exception * refactor: refactored register account endpoint. It also won't return a login token with the response anymore. * fix: fixed token lifespan for confirmation being in minutes instead of hours * refactor: refactored Serializer so the validated data is the data coming in body This is normally how they behave, so changing it can confuse other contributors who are familiar with Django rest framework. * refactor: Modified RequestPasswordResetView so that its serializer only validates incoming data Same as the other refactor, this is how serializers are usually used. The logic for doing stuff is done on the view itself. * refactor: modified LoginWithCredentialsView to have all logic in the view itself. As stated before, the serializer only task is to validate incoming data. * chore: update unit test
- Loading branch information
Showing
7 changed files
with
89 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
meta { | ||
name: Valid | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/resend-account-confirmation | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"email": "[email protected]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters