Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ interface ServerApi {
*/
fun getAllServers(): CompletableFuture<List<Server>>

/**
* @return a [CompletableFuture] with the [Server] from the SIMPLECLOUD_UNIQUE_ID environment
*/
fun getCurrentServer(): CompletableFuture<Server> {
return getServerById(System.getenv("SIMPLECLOUD_UNIQUE_ID"))
}

/**
* @param id the id of the server.
* @return a [CompletableFuture] with the [Server].
Expand Down Expand Up @@ -124,6 +131,13 @@ interface ServerApi {
*/
suspend fun getAllServers(): List<Server>

/**
* @return the [Server] from the SIMPLECLOUD_UNIQUE_ID environment
*/
suspend fun getCurrentServer(): Server {
return getServerById(System.getenv("SIMPLECLOUD_UNIQUE_ID"))
}

/**
* @param id the id of the server.
* @return the [Server].
Expand Down