feat: remove snapshot on ProjectionRepository
Some checks failed
Tests / build (push) Failing after 6m58s
Tests / lint (push) Has been skipped
Tests / test (push) Has been skipped

This commit is contained in:
2025-04-17 01:24:25 +02:00
parent b6e8a2f347
commit cba9971ca1
37 changed files with 478 additions and 871 deletions

View File

@@ -12,7 +12,7 @@ data class ICantPlay(
private val gameStateRepository: GameStateRepository,
) : CommandAction<ICantPlayCommand, PlayerHavePassEvent> {
override fun run(command: ICantPlayCommand): (version: Int) -> PlayerHavePassEvent {
val state = gameStateRepository.getLast(command.payload.aggregateId)
val state = gameStateRepository.get(command.payload.aggregateId)
if (state.currentPlayerTurn != command.payload.player) {
throw CommandException("Its not your turn!")