Add AggregateID for the PlayerNotificationEventListener and CommandHandler

This commit is contained in:
2025-03-17 19:41:47 +01:00
parent 0374712824
commit 1a96c68521
11 changed files with 96 additions and 42 deletions

View File

@@ -10,6 +10,7 @@ import io.ktor.server.plugins.cors.routing.CORS
import io.ktor.server.plugins.statuspages.StatusPages
import io.ktor.server.resources.Resources
import io.ktor.server.response.respondText
import kotlinx.serialization.Serializable
fun Application.configureHttpRouting() {
install(CORS) {
@@ -38,13 +39,14 @@ class BadRequestException(
val httpError: HttpErrorBadRequest,
) : Exception()
@Serializable
class HttpErrorBadRequest(
statusCode: HttpStatusCode,
val title: String = statusCode.description,
val invalidParams: List<InvalidParam>,
val title: String = HttpStatusCode.BadRequest.description,
val invalidParams: List<InvalidParam> = emptyList(),
) {
val statusCode: Int = statusCode.value
val statusCode: Int = HttpStatusCode.BadRequest.value
@Serializable
data class InvalidParam(
val name: String,
val reason: String,