summaryrefslogtreecommitdiff
path: root/sw-server/src/main/kotlin
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@gmail.com>2022-07-03 00:18:46 +0200
committerJoffrey Bion <joffrey.bion@gmail.com>2022-07-03 00:20:01 +0200
commit6640170c01ccf5c7de8c0893379c1b500f9e9fb1 (patch)
tree1b8b712a5ecf4fd7baf62f0c4a9b8399db1bcad7 /sw-server/src/main/kotlin
parentUpgrade Spring boot to 2.7.1 (diff)
downloadseven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.tar.gz
seven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.tar.bz2
seven-wonders-6640170c01ccf5c7de8c0893379c1b500f9e9fb1.zip
Upgrade to Kotlin 1.7
Diffstat (limited to 'sw-server/src/main/kotlin')
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/AutoGameController.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/AutoGameController.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/AutoGameController.kt
index bfdef6e9..51d1df17 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/AutoGameController.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/AutoGameController.kt
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RestController
import java.security.Principal
import kotlin.time.Duration.Companion.minutes
+import kotlin.time.ExperimentalTime
import kotlin.time.measureTimedValue
import kotlin.time.toJavaDuration
@@ -26,6 +27,7 @@ class AutoGameController(
@Value("\${server.port}") private val serverPort: String,
private val meterRegistry: MeterRegistry,
) {
+ @OptIn(ExperimentalTime::class)
@PostMapping("/autoGame")
suspend fun autoGame(@RequestBody action: AutoGameAction, principal: Principal): AutoGameResult {
logger.info("Starting auto-game {}", action.gameName)
bgstack15