A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix(rank): Remove user activated reputation record display
LinkinStareb1a9f876092
diff --git a/internal/service/rank/rank_service.go b/internal/service/rank/rank_service.goindex 3efdf939..111924e9 100644--- a/internal/service/rank/rank_service.go+++ b/internal/service/rank/rank_service.go@@ -245,23 +245,24 @@ func (rs *RankService) GetRankPersonalWithPage(ctx context.Context, req *schema.}resp := make([]*schema.GetRankPersonalWithPageResp, 0)for _, userRankInfo := range userRankPage {+ if len(userRankInfo.ObjectID) == 0 || userRankInfo.ObjectID == "0" {+ continue+ }commentResp := &schema.GetRankPersonalWithPageResp{CreatedAt: userRankInfo.CreatedAt.Unix(),ObjectID: userRankInfo.ObjectID,Reputation: userRankInfo.Rank,}- if len(userRankInfo.ObjectID) > 0 && userRankInfo.ObjectID != "0" {- objInfo, err := rs.objectInfoService.GetInfo(ctx, userRankInfo.ObjectID)- if err != nil {- log.Error(err)- } else {- commentResp.RankType = activity_type.Format(userRankInfo.ActivityType)- commentResp.ObjectType = objInfo.ObjectType- commentResp.Title = objInfo.Title- commentResp.Content = objInfo.Content- commentResp.QuestionID = objInfo.QuestionID- commentResp.AnswerID = objInfo.AnswerID- }+ objInfo, err := rs.objectInfoService.GetInfo(ctx, userRankInfo.ObjectID)+ if err != nil {+ log.Error(err)+ } else {+ commentResp.RankType = activity_type.Format(userRankInfo.ActivityType)+ commentResp.ObjectType = objInfo.ObjectType+ commentResp.Title = objInfo.Title+ commentResp.Content = objInfo.Content+ commentResp.QuestionID = objInfo.QuestionID+ commentResp.AnswerID = objInfo.AnswerID}resp = append(resp, commentResp)}