mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
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:
parent
c0cec43f39
commit
3e0246771e
@ -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())
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user