debug on ApiCommandRoutes.kt, SongList.kt

- ApiCommandRoutes.kt is CommandReloadEvent post 4 times.
- SongList.kt is song_list.req_name length 20 to 80(byte)
This commit is contained in:
dalbodeule 2024-09-14 18:36:24 +09:00
parent c0cec43f39
commit 3e0246771e
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65
2 changed files with 10 additions and 4 deletions

View File

@ -12,7 +12,7 @@ object SongLists: IntIdTable("song_list") {
val uid = varchar("uid", 64)
val url = varchar("url", 128)
val name = text("name")
val reqName = varchar("req_name", 20)
val reqName = varchar("req_name", 80)
val author = text("author")
val time = integer("time")
val created_at = datetime("created_at").default(LocalDateTime.now())

View File

@ -69,7 +69,9 @@ fun Routing.apiCommandRoutes() {
commandRequest.failContent ?: ""
)
CoroutineScope(Dispatchers.Default).launch {
dispatcher.post(CommandReloadEvent(user.token ?: ""))
for(i: Int in 0..3) {
dispatcher.post(CommandReloadEvent(user.token ?: ""))
}
}
call.respond(HttpStatusCode.OK)
}
@ -104,7 +106,9 @@ fun Routing.apiCommandRoutes() {
commandRequest.failContent ?: ""
)
CoroutineScope(Dispatchers.Default).launch {
dispatcher.post(CommandReloadEvent(user.token ?: ""))
for(i: Int in 0..3) {
dispatcher.post(CommandReloadEvent(user.token ?: ""))
}
}
call.respond(HttpStatusCode.OK)
} catch(e: Exception) {
@ -137,7 +141,9 @@ fun Routing.apiCommandRoutes() {
try {
CommandService.removeCommand(user, commandRequest.label)
CoroutineScope(Dispatchers.Default).launch {
dispatcher.post(CommandReloadEvent(user.token ?: ""))
for(i: Int in 0..3) {
dispatcher.post(CommandReloadEvent(user.token ?: ""))
}
}
call.respond(HttpStatusCode.OK)
} catch(e: Exception) {