Add Download CSV Url
Dieser Commit ist enthalten in:
Ursprung
6b30a53765
Commit
c0cc742051
@ -128,8 +128,8 @@ fun Routing.configureEventsRoute() {
|
||||
csv.appendLine()
|
||||
val blue = Team.get(it.teamBlue)
|
||||
val red = Team.get(it.teamRed)
|
||||
val winner = if (it.ergebnis == 1) blue.teamName else if(it.ergebnis == 2) red.teamName else "Tie"
|
||||
csv.append(arrayOf(it.startTime.toString(), Team.get(it.teamBlue).teamName, Team.get(it.teamRed).teamName, winner, Groups.getGroup(it.fightID)).joinToString(","))
|
||||
val winner = if (it.ergebnis == 1) blue.teamName else if(it.ergebnis == 2) red.teamName else if(it.ergebnis == 3) "Tie" else "Unknown"
|
||||
csv.append(arrayOf(it.startTime.toString(), Team.get(it.teamBlue).teamName, Team.get(it.teamRed).teamName, winner, Groups.getGroup(it.fightID) ?: "Ungrouped").joinToString(","))
|
||||
}
|
||||
call.response.header("Content-Disposition", "attachment; filename=\"${event.eventName}.csv\"")
|
||||
call.response.header("Content-Type", "text/csv")
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren