Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

[Write | EmailConfirmation] create slice ApproveEmailConfirmation -> EmailConfirmationWasApproved #284

Closed
9 tasks done
MateuszNaKodach opened this issue Sep 3, 2021 · 1 comment · Fixed by #313
Closed
9 tasks done
Assignees
Labels
scope: 🛰 api Requires changes in the api workspace type: ✨ feat Another new, shiny thing we can have in our app

Comments

@MateuszNaKodach
Copy link
Member

MateuszNaKodach commented Sep 3, 2021

Dependencies (blockers)

Subtasks
If you need more info or have questions, fell free to ask @nowakprojects.

Command definition:

  • Create command type ApproveEmailConfirmation in modules/shared/commands
  • Create ApproveEmailConfirmationApplicationCommand class in modules/shared/commands

Domain logic:

  • Create function approveEmailConfirmation in modules/write/email-confirmation/domain.
  • Return EmailConfirmationWasApproved from the method, only if correspondent (last not approved request, need to have same confirmationToken) EmailConfirmationWasRequested lastly and was not already approved. Read it from events with .reduce() method.

Application logic:

  • Create CommandHandler for ApproveEmailConfirmationApplicationCommand
  • Execute domain logic. Event stream name should be in format EmailConfirmation_${userId}_${confirmationFor} Do you know why? Try to elaborate before taking this task.

Presentation logic:

  • Rest API endpoint will be done in another task.

NestJS Module:

  • Your work should be done in EmailConfirmationWriteModule.

Event Modeling
MIRO link: https://miro.com/app/board/o9J_lQvnN28=/?moveToWidget=3074457363395418452&cot=14

@MateuszNaKodach MateuszNaKodach added type: ✨ feat Another new, shiny thing we can have in our app scope: 🛰 api Requires changes in the api workspace labels Sep 3, 2021
@MateuszNaKodach MateuszNaKodach changed the title [Write | EmailConfirmation] create slice ApproveEmailConfirmation -> EmailConfirmationWasApproved #279 [Write | EmailConfirmation] create slice ApproveEmailConfirmation -> EmailConfirmationWasApproved Sep 3, 2021
@KrystianKjjk KrystianKjjk self-assigned this Sep 7, 2021
@github-actions
Copy link

github-actions bot commented Sep 7, 2021

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: 🛰 api Requires changes in the api workspace type: ✨ feat Another new, shiny thing we can have in our app
Projects
None yet
2 participants