From 7fc5dbbf637598e5ec4111bec80d4dba7b000648 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Thu, 16 Mar 2023 15:43:50 +0800 Subject: [PATCH] update tags --- internal/schema/tag_schema.go | 7 ++++--- internal/service/tag_common/tag_common.go | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/schema/tag_schema.go b/internal/schema/tag_schema.go index 8e768ce0..021f8bca 100644 --- a/internal/schema/tag_schema.go +++ b/internal/schema/tag_schema.go @@ -271,7 +271,8 @@ type GetFollowingTagsResp struct { } type SearchTagLikeResp struct { - SlugName string `json:"slug_name"` - Recommend bool `json:"recommend"` - Reserved bool `json:"reserved"` + SlugName string `json:"slug_name"` + DisplayName string `json:"display_name"` + Recommend bool `json:"recommend"` + Reserved bool `json:"reserved"` } diff --git a/internal/service/tag_common/tag_common.go b/internal/service/tag_common/tag_common.go index da7ec466..593157b2 100644 --- a/internal/service/tag_common/tag_common.go +++ b/internal/service/tag_common/tag_common.go @@ -88,6 +88,7 @@ func (ts *TagCommonService) SearchTagLike(ctx context.Context, req *schema.Searc for _, tag := range tags { item := schema.SearchTagLikeResp{} item.SlugName = tag.SlugName + item.DisplayName = tag.DisplayName item.Recommend = tag.Recommend item.Reserved = tag.Reserved resp = append(resp, item)