managers relation is fixed

This commit is contained in:
dalbodeule 2024-08-28 16:21:34 +09:00
parent 7784130be3
commit 447858a48c
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65
2 changed files with 3 additions and 3 deletions

View File

@ -27,6 +27,6 @@ class User(id: EntityID<Int>) : IntEntity(id) {
var liveAlertChannel by Users.liveAlertChannel var liveAlertChannel by Users.liveAlertChannel
var liveAlertMessage by Users.liveAlertMessage var liveAlertMessage by Users.liveAlertMessage
val managers by User via UserManagers val managers by User referrersOn UserManagers.user
val suborinates by User via UserManagers val subordinate by User referrersOn UserManagers.manager
} }

View File

@ -117,7 +117,7 @@ fun Routing.apiRoutes() {
songConfig.disabled songConfig.disabled
)) ))
user.suborinates.forEach { user.subordinate.forEach {
val subStatus = user.token?.let { it1 -> getStreamInfo(it1) } val subStatus = user.token?.let { it1 -> getStreamInfo(it1) }
if(it.token == null) return@forEach if(it.token == null) return@forEach
if(subStatus?.content == null) return@forEach if(subStatus?.content == null) return@forEach