commit 18/09/2025
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user