add function subscribeToBus to GameCommandHandler

This commit is contained in:
2025-04-14 23:40:16 +02:00
parent 903eb975e3
commit e1529ee52c
3 changed files with 9 additions and 4 deletions
@@ -2,6 +2,7 @@ package eventDemo.configuration.business
import eventDemo.adapter.infrastructureLayer.event.projection.GameListRepositoryInMemory
import eventDemo.adapter.infrastructureLayer.event.projection.GameStateRepositoryInMemory
import eventDemo.business.command.GameCommandHandler
import eventDemo.business.event.projection.projectionListener.ReactionListener
import org.koin.core.Koin
@@ -14,4 +15,7 @@ fun Koin.configureGameListener() {
get<GameListRepositoryInMemory>()
.subscribeToBus(get(), get())
get<GameCommandHandler>()
.subscribeToBus(get())
}
@@ -10,7 +10,7 @@ import org.koin.core.module.dsl.singleOf
fun Module.configureDIBusiness() {
single {
GameCommandHandler(get(), get(), get(), get())
GameCommandHandler(get(), get(), get())
}
singleOf(::GameEventHandler)
singleOf(::GameCommandActionRunner)