forked from SteamWar/SteamWar
Remove Event-related SQL classes and update relevant references across modules
Signed-off-by: Chaoscaot <max@maxsp.de>
This commit is contained in:
@@ -66,7 +66,7 @@ fun Route.configureEventGroups() {
|
||||
val pointsPerLoss = updateEventGroup.pointsPerLoss ?: group.pointsPerLoss
|
||||
val pointsPerDraw = updateEventGroup.pointsPerDraw ?: group.pointsPerDraw
|
||||
group.update(name, type, pointsPerWin, pointsPerLoss, pointsPerDraw)
|
||||
call.respond(ResponseGroups(EventGroup.get(group.id).orElse(null) ?: return@put))
|
||||
call.respond(ResponseGroups(EventGroup.byId(group.getId()).orElse(null) ?: return@put))
|
||||
}
|
||||
delete {
|
||||
val group = call.receiveEventGroup() ?: return@delete
|
||||
@@ -84,7 +84,7 @@ suspend fun ApplicationCall.receiveEventGroup(): EventGroup? {
|
||||
return null
|
||||
}
|
||||
|
||||
val group = EventGroup.get(groupId).orElse(null)
|
||||
val group = EventGroup.byId(groupId).orElse(null)
|
||||
if (group == null) {
|
||||
respond(HttpStatusCode.NotFound)
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user