wip
This commit is contained in:
23
lib/policy_service/commanded_app.ex
Normal file
23
lib/policy_service/commanded_app.ex
Normal file
@@ -0,0 +1,23 @@
|
||||
defmodule PolicyService.Router do
|
||||
use Commanded.Commands.Router
|
||||
alias PolicyService.Commands.Car
|
||||
alias PolicyService.Aggregates
|
||||
|
||||
dispatch(
|
||||
[
|
||||
Car.SubmitCarPolicyApplication,
|
||||
Car.RecordCarProviderQuote,
|
||||
Car.AcceptCarQuoteAndSolicit,
|
||||
Car.RecordCarPolicyIssued
|
||||
],
|
||||
to: PolicyService.Aggregates.CarPolicyApplication,
|
||||
identity: :application_id
|
||||
)
|
||||
end
|
||||
|
||||
defmodule PolicyService.CommandedApp do
|
||||
use Commanded.Application,
|
||||
otp_app: :policy_service
|
||||
|
||||
router(PolicyService.Router)
|
||||
end
|
||||
Reference in New Issue
Block a user