Add event referees management and teams endpoint.

Introduced a new route for managing event referees with get, put, and delete operations. Also added an endpoint to fetch all teams, and integrated the referees routing into event configuration.
This commit is contained in:
2025-05-10 22:22:43 +02:00
parent e3179c69aa
commit 6e9db276ef
3 changed files with 59 additions and 0 deletions
@@ -25,6 +25,7 @@ import de.steamwar.plugins.SWAuthPrincipal
import de.steamwar.plugins.SWPermissionCheck
import de.steamwar.sql.SchematicType
import de.steamwar.sql.SteamwarUser
import de.steamwar.sql.Team
import de.steamwar.sql.UserPerm
import de.steamwar.sql.loadSchematicTypes
import de.steamwar.util.fetchData
@@ -77,6 +78,9 @@ fun Route.configureDataRoutes() {
get("/users") {
call.respond(SteamwarUser.getAll().map { ResponseUser(it) })
}
get("/teams") {
call.respond(Team.getAll().map { ResponseTeam(it) })
}
get("/schematicTypes") {
val types = mutableListOf<SchematicType>()
loadSchematicTypes(types, mutableMapOf())