diff --git a/server-go/internal/handler/health.go b/server-go/internal/handler/health.go index 639d01a..49d8a11 100644 --- a/server-go/internal/handler/health.go +++ b/server-go/internal/handler/health.go @@ -14,7 +14,7 @@ import ( // RegisterHealthRoutes 注册蚕房健康画像路由 func RegisterHealthRoutes(rg *gin.RouterGroup, db *gorm.DB) { - rg.GET("/rooms/:id/health-profile", + rg.GET("/health-profiles/:roomId", middleware.RequirePermission(db, "room:read"), roomHealthProfile(db)) } diff --git a/web/src/dal/health.ts b/web/src/dal/health.ts index 4f5c697..79898a7 100644 --- a/web/src/dal/health.ts +++ b/web/src/dal/health.ts @@ -12,7 +12,7 @@ export interface HealthProfile { } export const getHealthProfile = (roomId: string) => - get(`/rooms/${roomId}/health-profile`); + get(`/health-profiles/${roomId}`); export const getMonthlyStats = (year?: number) => get<{ year: number; stats: { month: string; total: number; diseases: Record }[] }>(