Revert "Add EventCache for efficient retrieval of event groups and teams"

This reverts commit 8b4f864f99.

Revert "Refactor EventFights and Fight classes to improve player initialization and retrieval"

This reverts commit 8d705e7a84.

Revert "Refactor EventFights and Fight classes to improve player initialization and retrieval"

This reverts commit 78352a3e67.
This commit is contained in:
2025-11-14 23:24:48 +01:00
parent 78352a3e67
commit f923a007a7
6 changed files with 12 additions and 93 deletions
@@ -20,7 +20,6 @@
package de.steamwar.routes
import de.steamwar.ResponseError
import de.steamwar.data.EventCache
import de.steamwar.plugins.SWPermissionCheck
import de.steamwar.sql.*
import de.steamwar.sql.EventGroup.EventGroupType
@@ -114,10 +113,10 @@ data class ExtendedResponseEvent(
val referees: List<ResponseUser>,
val relations: List<ResponseRelation>
) {
constructor(event: Event, cache: EventCache = EventCache()) : this(
constructor(event: Event) : this(
ResponseEvent(event),
TeamTeilnahme.getTeams(event.eventID).map { cache.convertTeam(it) },
EventGroup.get(event).map { cache.convertGroup(it) },
TeamTeilnahme.getTeams(event.eventID).map { ResponseTeam(it) },
EventGroup.get(event).map { ResponseGroups(it) },
EventFight.getEvent(event.eventID).map { ResponseEventFight(it) },
Referee.get(event.eventID).map { ResponseUser.get(SteamwarUser.byId(it)!!) },
EventRelation.get(event).map { ResponseRelation(it) }