-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(dependencies): update dependencies to new way of typing it (pre…
…paring it for v2 breaking changes)
- Loading branch information
1 parent
3123ae7
commit f105dd5
Showing
7 changed files
with
32 additions
and
25 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
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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
from meiga import BoolResult | ||
from petisco import Container | ||
from petisco import Container, CrudRepository, DomainEventBus | ||
from petisco.extra.fastapi import FastAPIController | ||
|
||
from app.src.task.create.application.task_creator import TaskCreator | ||
from app.src.task.label.domain.task_labeler import TaskLabeler | ||
from app.src.task.shared.domain.task import Task | ||
|
||
|
||
class CreateTaskController(FastAPIController): | ||
def execute(self, task: Task) -> BoolResult: | ||
task_creator = TaskCreator( | ||
labeler=Container.get("task_labeler"), | ||
repository=Container.get("task_repository"), | ||
domain_event_bus=Container.get("domain_event_bus"), | ||
labeler=Container.get(TaskLabeler), | ||
repository=Container.get(CrudRepository, alias="task_repository"), | ||
domain_event_bus=Container.get(DomainEventBus), | ||
) | ||
return task_creator.execute(task=task) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
from meiga import BoolResult | ||
from petisco import Container | ||
from petisco import Container, CrudRepository, DomainEventBus | ||
from petisco.extra.fastapi import FastAPIController | ||
|
||
from app.src.task.label.domain.task_labeler import TaskLabeler | ||
from app.src.task.shared.domain.task import Task | ||
from app.src.task.update.application.task_updater import TaskUpdater | ||
|
||
|
||
class UpdateTaskController(FastAPIController): | ||
def execute(self, task: Task) -> BoolResult: | ||
updater = TaskUpdater( | ||
labeler=Container.get("task_labeler"), | ||
repository=Container.get("task_repository"), | ||
domain_event_bus=Container.get("domain_event_bus"), | ||
labeler=Container.get(TaskLabeler), | ||
repository=Container.get(CrudRepository, alias="task_repository"), | ||
domain_event_bus=Container.get(DomainEventBus), | ||
) | ||
return updater.execute(task=task) |
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