WIP
This commit is contained in:
15
lib/customer_service/commanded_app.ex
Normal file
15
lib/customer_service/commanded_app.ex
Normal file
@@ -0,0 +1,15 @@
|
||||
defmodule CustomerService.Router do
|
||||
use Commanded.Commands.Router
|
||||
alias CustomerService.Commands
|
||||
alias CustomerService.Aggregates
|
||||
|
||||
identify(Aggregates.Customer, by: :id)
|
||||
dispatch([Commands.CreateCustomer], to: Aggregates.Customer)
|
||||
end
|
||||
|
||||
defmodule CustomerService.CommandedApp do
|
||||
use Commanded.Application,
|
||||
otp_app: :customer_service
|
||||
|
||||
router(CustomerService.Router)
|
||||
end
|
||||
Reference in New Issue
Block a user