From 6640170c01ccf5c7de8c0893379c1b500f9e9fb1 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 3 Jul 2022 00:18:46 +0200 Subject: Upgrade to Kotlin 1.7 --- .../org/luxons/sevenwonders/server/controllers/AutoGameController.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sw-server') 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) -- cgit