From 725d98aac55846ce15c46e02ba8ae7d91ab64a56 Mon Sep 17 00:00:00 2001 From: weijuesen Date: Thu, 13 Aug 2026 14:28:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(server-go):=20=E5=81=A5=E5=BA=B7=E7=94=BB?= =?UTF-8?q?=E5=83=8F=E8=B7=AF=E7=94=B1=E4=B8=8E=20/rooms/:id=20=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E5=AF=BC=E8=87=B4=E5=90=AF=E5=8A=A8=20panic=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=20/health-profiles/:roomId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-go/internal/handler/health.go | 2 +- web/src/dal/health.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 }[] }>(