diff --git a/server-go/internal/handler/health.go b/server-go/internal/handler/health.go index 2bcb4fd..d5f3396 100644 --- a/server-go/internal/handler/health.go +++ b/server-go/internal/handler/health.go @@ -29,7 +29,7 @@ func RegisterHealthProfileRoutes(rg *gin.RouterGroup, db *gorm.DB) { // roomHealthProfile 单蚕房健康画像:巡检风险/检测结果/事件聚合 → 综合健康分 func roomHealthProfile(db *gorm.DB) gin.HandlerFunc { return func(c *gin.Context) { - id := c.Param("id") + id := c.Param("roomId") var room model.Room if db.Where("id = ?", id).First(&room).Error != nil { c.JSON(http.StatusNotFound, gin.H{"error": "room not found"})