Skip to content

Commit

Permalink
Rename server name to id
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Oct 30, 2023
1 parent 4d5cc4c commit 29f1f56
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/com/faforever/icebreaker/service/Server.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.faforever.icebreaker.service

data class Server(
val name: String,
val id: String,
val region: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CoturnSessionHandler(
}

override fun getIceServers() =
coturnServerRepository.findActive().map { Server(name = it.host, region = it.region) }
coturnServerRepository.findActive().map { Server(id = it.host, region = it.region) }

override fun getIceServersSession(sessionId: String): List<Session.Server> =
coturnServerRepository.findActive()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class XirsysSessionHandler(
is XirsysResponse.Success -> result.data
}

override fun getIceServers() = listOf(Server(name = SERVER_NAME, region = "Global"))
override fun getIceServers() = listOf(Server(id = SERVER_NAME, region = "Global"))

override fun getIceServersSession(sessionId: String): List<Session.Server> =
when (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ServerController(private val sessionService: SessionService) {
sessionService.getServers().map {
JsonApiObject(
type = "iceServer",
id = it.name,
id = it.id,
attributes = mapOf("region" to it.region),
)
},
Expand Down

0 comments on commit 29f1f56

Please sign in to comment.