Files
policy-service/lib/policy_service/commanded_app.ex
Haim Kortovich a52f049a29 wip
2026-03-05 11:30:08 -05:00

24 lines
528 B
Elixir

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