diff --git a/controller/uptime_kuma.go b/controller/uptime_kuma.go index 245cac3f..6ceaa1f3 100644 --- a/controller/uptime_kuma.go +++ b/controller/uptime_kuma.go @@ -82,18 +82,11 @@ func GetUptimeKumaStatus(c *gin.Context) { slug := common.OptionMap["UptimeKumaSlug"] common.OptionMapRWMutex.RUnlock() - if uptimeKumaUrl == "" { - c.JSON(http.StatusBadRequest, gin.H{ - "success": false, - "message": "未配置 Uptime Kuma URL", - }) - return - } - - if slug == "" { - c.JSON(http.StatusBadRequest, gin.H{ - "success": false, - "message": "未配置 Uptime Kuma Slug", + if uptimeKumaUrl == "" || slug == "" { + c.JSON(http.StatusOK, gin.H{ + "success": true, + "message": "", + "data": []MonitorStatus{}, }) return }