Merge branch 'main' into Schematics/1.21

# Conflicts:
#	VelocityCore/build.gradle.kts
This commit is contained in:
2024-12-21 19:29:46 +01:00
77 changed files with 990 additions and 780 deletions
@@ -37,6 +37,9 @@ class Groups {
private var groups: GroupsData = if (kGroupsFile.exists()) {
Cbor.decodeFromByteArray(kGroupsFile.readBytes())
} else {
if (!kGroupsFile.parentFile.exists()) {
kGroupsFile.parentFile.mkdirs()
}
kGroupsFile.createNewFile()
kGroupsFile.writeBytes(Cbor.encodeToByteArray(GroupsData(mutableListOf())))
@@ -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()
if (eventId == null) {
respond(HttpStatusCode.BadRequest, ResponseError("Invalid event ID"))