forked from SteamWar/SteamWar
Fix Event
This commit is contained in:
@@ -234,7 +234,7 @@ fun Route.configureEventsRoute() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun ApplicationCall.receiveEvent(fieldName: String = "event"): Event? {
|
suspend fun ApplicationCall.receiveEvent(fieldName: String = "id"): Event? {
|
||||||
val eventId = parameters[fieldName]?.toIntOrNull()
|
val eventId = parameters[fieldName]?.toIntOrNull()
|
||||||
if (eventId == null) {
|
if (eventId == null) {
|
||||||
respond(HttpStatusCode.BadRequest, ResponseError("Invalid event ID"))
|
respond(HttpStatusCode.BadRequest, ResponseError("Invalid event ID"))
|
||||||
|
|||||||
Reference in New Issue
Block a user