command, ws ping message fix

- remove commands (command CRUD, hook, alert)
- ws ping message fix
This commit is contained in:
dalbodeule
2024-08-15 16:56:31 +09:00
parent 9a303ff342
commit 20417745d4
10 changed files with 29 additions and 332 deletions

View File

@@ -70,6 +70,10 @@ fun Routing.wsSongListRoutes() {
for (frame in incoming) {
when(frame) {
is Frame.Text -> {
if(frame.readText() == "ping") {
send(Frame.Pong(frame.data))
return@webSocket
}
val data = frame.readText().let { Json.decodeFromString<SongRequest>(it) }
if(data.maxQueue != null && data.maxQueue > 0) SongConfigService.updateQueueLimit(user, data.maxQueue)

View File

@@ -63,7 +63,10 @@ fun Routing.wsSongRoutes() {
for (frame in incoming) {
when(frame) {
is Frame.Text -> {
if(frame.readText() == "ping") {
send(Frame.Pong(frame.data))
return@webSocket
}
}
is Frame.Ping -> send(Frame.Pong(frame.data))
else -> {

View File

@@ -63,7 +63,10 @@ fun Routing.wsTimerRoutes() {
for (frame in incoming) {
when(frame) {
is Frame.Text -> {
if(frame.readText() == "ping") {
send(Frame.Pong(frame.data))
return@webSocket
}
}
is Frame.Ping -> send(Frame.Pong(frame.data))
else -> {