Commit 67d028cf authored by shaw's avatar shaw
Browse files

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

将后端路由与前端API调用对齐:
- /user/profile -> /users/me
- PUT /user/password -> POST /users/me/password
parent 66ba4876
...@@ -227,10 +227,10 @@ func registerRoutes(r *gin.Engine, h *handler.Handlers, s *service.Services, rep ...@@ -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管理
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment