feat: 徽章处理
This commit is contained in:
@@ -82,3 +82,23 @@ func (a *UserProfileApi) MyStars(c *gin.Context) {
|
||||
PageSize: req.PageSize,
|
||||
}, c)
|
||||
}
|
||||
|
||||
// MyBadges 我的徽章
|
||||
// @Tags 个人中心
|
||||
// @Summary 我的徽章
|
||||
// @Security BearerAuth
|
||||
// @Produce application/json
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
|
||||
// @Router /profile/badge [get]
|
||||
func (a *UserProfileApi) MyBadges(c *gin.Context) {
|
||||
userId := auth.GetUserId(c)
|
||||
list, err := userProfileService.MyBadges(userId)
|
||||
if err != nil {
|
||||
global.Logger.Error("获取用户徽章失败", zap.Error(err))
|
||||
response.FailWithMsg("获取用户徽章失败", c)
|
||||
return
|
||||
}
|
||||
response.OkWithData(response.ListResult{
|
||||
List: list,
|
||||
}, c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user