Add Group List
Dieser Commit ist enthalten in:
Ursprung
af638716ad
Commit
5820fed03e
@ -59,5 +59,9 @@ class Groups {
|
||||
newGroup.fights.add(fight)
|
||||
kGroupsFile.writeBytes(Cbor.encodeToByteArray(groups))
|
||||
}
|
||||
|
||||
fun getAllGroups(): List<String> {
|
||||
return groups.groups.map { it.name }
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package de.steamwar.routes
|
||||
|
||||
import de.steamwar.ResponseError
|
||||
import de.steamwar.sql.SQLWrapperImpl
|
||||
import de.steamwar.data.Groups
|
||||
import de.steamwar.sql.SchematicType
|
||||
import de.steamwar.sql.SteamwarUser
|
||||
import de.steamwar.sql.loadSchematicTypes
|
||||
@ -50,5 +50,8 @@ fun Routing.configureDataRoutes() {
|
||||
get {
|
||||
call.respondText("Hello World!")
|
||||
}
|
||||
get("/groups") {
|
||||
call.respond(Groups.getAllGroups())
|
||||
}
|
||||
}
|
||||
}
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren