fix: 修复用户修改密码接口404问题

将后端路由与前端API调用对齐:
- /user/profile -> /users/me
- PUT /user/password -> POST /users/me/password
This commit is contained in:
shaw
2025-12-18 22:59:49 +08:00
parent 66ba487697
commit 67d028cf50

View File

@@ -227,10 +227,10 @@ func registerRoutes(r *gin.Engine, h *handler.Handlers, s *service.Services, rep
authenticated.GET("/auth/me", h.Auth.GetCurrentUser) authenticated.GET("/auth/me", h.Auth.GetCurrentUser)
// 用户接口 // 用户接口
user := authenticated.Group("/user") user := authenticated.Group("/users/me")
{ {
user.GET("/profile", h.User.GetProfile) user.GET("", h.User.GetProfile)
user.PUT("/password", h.User.ChangePassword) user.POST("/password", h.User.ChangePassword)
} }
// API Key管理 // API Key管理