This repository was archived by the owner on Mar 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
feat(api): [write | emailConfirmation] rest API endpoint for ApproveEmailConfirmation (#287) #367
Merged
MateuszNaKodach
merged 5 commits into
main
from
issue-287-_Write_EmailConfirmation_REST_API_endpoint_for_ApproveEmailConfirmation
Sep 30, 2021
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
887bed8
Add controller and update models
KrystianKjjk 81f3526
Merge branch 'main' of https://github.com/CodersCrew/coderscamp into …
KrystianKjjk 76dfbe3
Merge branch 'main' of https://github.com/CodersCrew/coderscamp into …
KrystianKjjk 3875a22
Update controller, error and add method to http file
KrystianKjjk bd0bce9
Merge branch 'main' of https://github.com/CodersCrew/coderscamp into …
KrystianKjjk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,10 +1,20 @@ | ||
| # email-confirmation.rest-controller.ts | ||
|
|
||
| @confirmationFor = 'user-registration' | ||
| @confirmationToken = 'SomeConfirmationToken' | ||
|
|
||
| # Request email-confirmation for user | ||
| POST {{serverUrl}}/email-confirmation | ||
|
|
||
| { | ||
| "confirmationFor": "{{confirmationFor}}" | ||
| } | ||
|
|
||
| ### | ||
|
|
||
| # Approve email-confirmation for user | ||
| POST {{serverUrl}}/email-confirmation/Approval | ||
|
|
||
| { | ||
| "confirmationToken": "{{confirmationToken}}" | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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.
8 changes: 8 additions & 0 deletions
8
packages/shared/src/models/email-confirmation/approve-email-confirmation.ts
This file contains hidden or 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,8 @@ | ||
| import { IsString } from 'class-validator'; | ||
|
|
||
| export const APPROVE_ENDPOINT = '/approval'; | ||
|
|
||
| export class ApproveEmailConfirmationBody { | ||
| @IsString() | ||
| confirmationToken: string; | ||
| } |
6 changes: 6 additions & 0 deletions
6
packages/shared/src/models/email-confirmation/request-email-confirmation.ts
This file contains hidden or 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,6 @@ | ||
| import { IsString } from 'class-validator'; | ||
|
|
||
| export class RequestEmailConfirmationBody { | ||
| @IsString() | ||
| confirmationFor: string; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.