feat: add return of table state
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user