diff --git a/src/main/kotlin/com/hisense/dahua_video/controller/MonitorController.kt b/src/main/kotlin/com/hisense/dahua_video/controller/MonitorController.kt index db0655c..4a7b446 100644 --- a/src/main/kotlin/com/hisense/dahua_video/controller/MonitorController.kt +++ b/src/main/kotlin/com/hisense/dahua_video/controller/MonitorController.kt @@ -48,7 +48,7 @@ class MonitorController( val channelId = queryParams.get("channelId") val subType = queryParams.get("subType") val scheme = queryParams.get("scheme") - event!!.request(EventBusAddress.SYS_MONITOR_USER_ALLMONITORUSER.address, JsonObject()) { + event!!.request(EventBusAddress.SYS_MONITOR_USER_ALLMONITORUSER_TOKEN.address, JsonObject()) { if (it.succeeded()) { val token = it.result().body().stream().filter { index -> index as JsonObject @@ -58,7 +58,7 @@ class MonitorController( tokenInfo as JsonObject tokenInfo.put("channelId", channelId) tokenInfo.put("subType", subType) - tokenInfo.put("scheme", MonitorScheme.values()[scheme as Int].scheme) + tokenInfo.put("scheme", MonitorScheme.values()[scheme.toInt()].scheme) event!!.request(EventBusAddress.SYS_DEVICE_CHANNEL_PREVIEW_URL.address, tokenInfo) { previewUrl -> if (previewUrl.succeeded()) { requestHandler