Create route to list all the games
This commit is contained in:
@@ -2,9 +2,11 @@ package eventDemo.configuration.injection
|
||||
|
||||
import eventDemo.adapter.infrastructureLayer.event.GameEventBusInMemory
|
||||
import eventDemo.adapter.infrastructureLayer.event.GameEventStoreInMemory
|
||||
import eventDemo.adapter.infrastructureLayer.event.projection.GameListRepositoryInMemory
|
||||
import eventDemo.adapter.infrastructureLayer.event.projection.GameStateRepositoryInMemory
|
||||
import eventDemo.business.event.GameEventBus
|
||||
import eventDemo.business.event.GameEventStore
|
||||
import eventDemo.business.event.projection.gameList.GameListRepository
|
||||
import eventDemo.business.event.projection.gameState.GameStateRepository
|
||||
import eventDemo.libs.event.projection.SnapshotConfig
|
||||
import org.koin.core.module.Module
|
||||
@@ -22,4 +24,8 @@ fun Module.configureDIInfrastructure() {
|
||||
single {
|
||||
GameStateRepositoryInMemory(get(), get(), snapshotConfig = SnapshotConfig())
|
||||
} bind GameStateRepository::class
|
||||
|
||||
single {
|
||||
GameListRepositoryInMemory(get(), get(), snapshotConfig = SnapshotConfig())
|
||||
} bind GameListRepository::class
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package eventDemo.configuration.route
|
||||
|
||||
import eventDemo.adapter.interfaceLayer.readGamesList
|
||||
import eventDemo.adapter.interfaceLayer.readTheGameState
|
||||
import io.ktor.server.application.Application
|
||||
import io.ktor.server.routing.routing
|
||||
@@ -8,5 +9,6 @@ import org.koin.ktor.ext.get
|
||||
fun Application.declareHttpGameRoute() {
|
||||
routing {
|
||||
readTheGameState(get())
|
||||
readGamesList(get())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user