commit 18/09/2025

This commit is contained in:
2025-09-18 15:57:11 +07:00
parent 09d074aa03
commit 120c8e5276
19 changed files with 2696 additions and 1591 deletions

View File

@@ -892,6 +892,37 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>, val
}
}
path("SoundChannel"){
get("List"){
it.result(MariaDB.ArrayListtoString(db.SoundChannelList))
}
delete("List"){
// truncate sound channel table
if (db.Clear_SoundChannel()) {
db.GetSoundChannel()
it.result(objectmapper.writeValueAsString(resultMessage("OK")))
} else {
it.status(500).result(objectmapper.writeValueAsString(resultMessage("Failed to truncate sound channel table")))
}
}
patch("UpdateByIndex/{index}"){
val index = it.pathParam("index").toUIntOrNull()
if (index == null) {
it.status(400).result(objectmapper.writeValueAsString(resultMessage("Invalid index")))
return@patch
}
val json: JsonNode = objectmapper.readTree(it.body())
}
get("ExportXLSX"){
}
post("ImportXLSX"){
}
}
}
}
}.start(listenPort)