myProfileHandler (#239)

Co-authored-by: Buf Generate <buf-generate@bondee.com>
This commit is contained in:
Carlo
2025-10-16 21:17:28 +08:00
committed by GitHub
parent 23f85616b4
commit 844ff8c102
5 changed files with 92 additions and 0 deletions

View File

@@ -227,3 +227,17 @@ func healthHandler(c *gin.Context) {
"timestamp": "now",
}, "服务正常")
}
// myProfileHandler 我的信息
func (s *AppServer) myProfileHandler(c *gin.Context) {
// 获取当前登录用户信息
result, err := s.xiaohongshuService.GetMyProfile(c.Request.Context())
if err != nil {
respondError(c, http.StatusInternalServerError, "GET_MY_PROFILE_FAILED",
"获取我的主页失败", err.Error())
return
}
c.Set("account", "ai-report")
respondSuccess(c, map[string]any{"data": result}, "获取我的主页成功")
}