init commit
This commit is contained in:
32
lib/workload_service/commanded_app.ex
Normal file
32
lib/workload_service/commanded_app.ex
Normal file
@@ -0,0 +1,32 @@
|
||||
defmodule WorkloadService.Router do
|
||||
use Commanded.Commands.Router
|
||||
|
||||
dispatch(
|
||||
[
|
||||
WorkloadService.Commands.QuoteTask.CreateTask,
|
||||
WorkloadService.Commands.QuoteTask.SubmitResponse,
|
||||
WorkloadService.Commands.QuoteTask.ApproveSubmission,
|
||||
WorkloadService.Commands.QuoteTask.CompleteTask
|
||||
],
|
||||
to: WorkloadService.Aggregates.QuoteTask,
|
||||
identity: :id
|
||||
)
|
||||
|
||||
dispatch(
|
||||
[
|
||||
WorkloadService.Commands.SolicitationTask.CreateTask,
|
||||
WorkloadService.Commands.SolicitationTask.SubmitResponse,
|
||||
WorkloadService.Commands.SolicitationTask.ApproveSubmission,
|
||||
WorkloadService.Commands.SolicitationTask.CompleteTask
|
||||
],
|
||||
to: WorkloadService.Aggregates.SolicitationTask,
|
||||
identity: :id
|
||||
)
|
||||
end
|
||||
|
||||
defmodule WorkloadService.CommandedApp do
|
||||
use Commanded.Application,
|
||||
otp_app: :workload_service
|
||||
|
||||
router(WorkloadService.Router)
|
||||
end
|
||||
Reference in New Issue
Block a user