diff --git a/common/src/main/kotlin/space/mori/chzzk_bot/common/models/User.kt b/common/src/main/kotlin/space/mori/chzzk_bot/common/models/User.kt index 2bb9e9b..a5f0603 100644 --- a/common/src/main/kotlin/space/mori/chzzk_bot/common/models/User.kt +++ b/common/src/main/kotlin/space/mori/chzzk_bot/common/models/User.kt @@ -27,6 +27,6 @@ class User(id: EntityID) : IntEntity(id) { var liveAlertChannel by Users.liveAlertChannel var liveAlertMessage by Users.liveAlertMessage - val managers by User via UserManagers - val suborinates by User via UserManagers + val managers by User referrersOn UserManagers.user + val subordinate by User referrersOn UserManagers.manager } \ No newline at end of file diff --git a/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/routes/ApiRoutes.kt b/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/routes/ApiRoutes.kt index 30fa680..43fc987 100644 --- a/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/routes/ApiRoutes.kt +++ b/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/routes/ApiRoutes.kt @@ -117,7 +117,7 @@ fun Routing.apiRoutes() { songConfig.disabled )) - user.suborinates.forEach { + user.subordinate.forEach { val subStatus = user.token?.let { it1 -> getStreamInfo(it1) } if(it.token == null) return@forEach if(subStatus?.content == null) return@forEach