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

[Write | LearningMaterialsTasks] Create slice CompleteTask -> TaskWasCompleted #211

@MateuszNaKodach

Description

@MateuszNaKodach

Dependencies (blockers)

Subtasks
Command definition:

  • Create command type CompleteTask in modules/shared/commands
  • Create CompleteTaskApplicationCommand class in modules/shared/commands

Domain logic:

  • Create function completeTask in modules/write/learning-materials-tasks/domain.
  • Return TaskWasCompleted on every CompleteTask just if task is not already completed.

Application logic:

  • Create CommandHandler for CompleteTaskApplicationCommand
  • Execute domain logic for complete task. Event stream name should be in format LearningMaterialsTasks_${learningMaterialsId}

Presentation logic:

  • Create ProcessStEventsRestController in modules/write/learning-materials-tasks/presentation/rest with endpoint POST process-st/events/task-checked-unchecked
  • Execute CompleteTask command on TaskCheckedUnchecked webook event if task status is Completed

NestJS Module:

  • Create LearningMaterialsTasks module and declare all required providers / controllers. Similar as in LearningMaterialsUrlModule.

Screenshot from MIRO (Event Modeling):
image

Metadata

Metadata

Assignees

Labels

scope: 🛰 apiRequires changes in the api workspacetype: ✨ featAnother new, shiny thing we can have in our app

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions