feat: add return of table state

This commit is contained in:
2026-01-27 22:11:49 +01:00
parent 189eb135bb
commit d749dea6f4
15 changed files with 576 additions and 28 deletions

View File

@@ -51,6 +51,9 @@ public class RMatch {
@Inject
TradService trad;
@Inject
RState rState;
private Uni<MatchModel> getById(long id, WebSocketConnection connection) {
return matchRepository.findById(id)
.invoke(Unchecked.consumer(o -> {
@@ -195,6 +198,7 @@ public class RMatch {
return Panache.withTransaction(() -> matchRepository.persist(mm));
})
.invoke(mm -> toSend.add(MatchEntity.fromModel(mm)))
.invoke(mm -> rState.setMatchEnd(connection, matchEnd))
.chain(mm -> updateEndAndTree(mm, toSend))
.invoke(__ -> SSMatch.sendMatch(connection, toSend))
.replaceWithVoid();