diff --git a/common/src/main/kotlin/space/mori/chzzk_bot/common/models/SongList.kt b/common/src/main/kotlin/space/mori/chzzk_bot/common/models/SongList.kt index 2330baa..9d2cdbb 100644 --- a/common/src/main/kotlin/space/mori/chzzk_bot/common/models/SongList.kt +++ b/common/src/main/kotlin/space/mori/chzzk_bot/common/models/SongList.kt @@ -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()) diff --git a/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/routes/ApiCommandRoutes.kt b/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/routes/ApiCommandRoutes.kt index 8629a5f..b7a1456 100644 --- a/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/routes/ApiCommandRoutes.kt +++ b/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/routes/ApiCommandRoutes.kt @@ -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) {