feat: remove old card system

This commit is contained in:
2026-01-29 22:43:59 +01:00
parent 9018ecef12
commit 4c260b86b9
8 changed files with 2 additions and 124 deletions

View File

@@ -46,9 +46,6 @@ public class RCategorie {
@Inject
TreeRepository treeRepository;
@Inject
CardboardRepository cardboardRepository;
@Inject
CardService cardService;
@@ -221,7 +218,6 @@ public class RCategorie {
public Uni<Void> deleteCategory(WebSocketConnection connection, Long id) {
return getById(id, connection)
.call(cat -> Panache.withTransaction(() -> treeRepository.delete("category = ?1", cat.getId())
.call(__ -> cardboardRepository.delete("match.category = ?1", cat))
.call(__ -> matchRepository.delete("category = ?1", cat))))
.chain(cat -> Panache.withTransaction(() -> categoryRepository.delete(cat)))
.invoke(__ -> SSCategorie.sendDelCategory(connection, id))

View File

@@ -45,9 +45,6 @@ public class RMatch {
@Inject
CompetitionGuestRepository competitionGuestRepository;
@Inject
CardboardRepository cardboardRepository;
@Inject
TradService trad;
@@ -289,9 +286,7 @@ public class RMatch {
public Uni<Void> deleteMatch(WebSocketConnection connection, Long idMatch) {
return getById(idMatch, connection)
.map(__ -> idMatch)
.chain(l -> Panache.withTransaction(() ->
cardboardRepository.delete("match.id = ?1", l)
.chain(__ -> matchRepository.delete("id = ?1", l))))
.chain(l -> Panache.withTransaction(() -> matchRepository.delete("id = ?1", l)))
.invoke(__ -> SSMatch.sendDeleteMatch(connection, idMatch))
.replaceWithVoid();
}

View File

@@ -117,20 +117,6 @@ public class RState {
}
}
public List<Long> getAllCategories(String uuid) {
return tableStates.values().stream()
.filter(s -> s.getCompetitionUuid()
.equals(uuid) && s.getSelectedCategory() != null && s.getSelectedCategory() != -1)
.map(TableState::getSelectedCategory).distinct().toList();
}
public List<Long> getAllMatchActive(String uuid) {
return tableStates.values().stream()
.filter(s -> s.getCompetitionUuid()
.equals(uuid) && s.getState() == MatchState.IN_PROGRESS && s.getSelectedMatch() != null && s.getSelectedMatch() != -1)
.map(TableState::getSelectedMatch).distinct().toList();
}
@RegisterForReflection
public record ChronoState(long time, long startTime, long configTime, long configPause, int state) {
public boolean isRunning() {