From b8f10912c1129a5ca8790a869ab38a7e019ea7c6 Mon Sep 17 00:00:00 2001 From: tuannt20 <105765641+tuannt20@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:27:45 +0700 Subject: [PATCH] rename --- client/social_post.go | 6 +++--- model/social_post_response.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/social_post.go b/client/social_post.go index 9e614c0..72b1781 100644 --- a/client/social_post.go +++ b/client/social_post.go @@ -41,7 +41,7 @@ func (s SocialPost) GetListSocialPostAppInfoByIDs(p model.GetListSocialPostAppBy } // GetBriefDetailSocialPostAdminByIDsRequest ... -func (s SocialPost) GetBriefDetailSocialPostAdminByIDsRequest(p model.GetBriefInfoSocialPostAdminByIDsRequest) (*model.ResponseDetailSocialPostAdminInfo, error) { +func (s SocialPost) GetBriefDetailSocialPostAdminByIDsRequest(p model.GetBriefInfoSocialPostAdminByIDsRequest) (*model.ResponseListSocialPostAdminInfo, error) { msg, err := natsio.GetServer().Request(subject.SocialPost.GetBriefInfoSocialPostAdminByIDs, toBytes(p)) if err != nil { @@ -49,8 +49,8 @@ func (s SocialPost) GetBriefDetailSocialPostAdminByIDsRequest(p model.GetBriefIn } var r struct { - Data *model.ResponseDetailSocialPostAdminInfo `json:"data"` - Error string `json:"error"` + Data *model.ResponseListSocialPostAdminInfo `json:"data"` + Error string `json:"error"` } if err = json.Unmarshal(msg.Data, &r); err != nil { diff --git a/model/social_post_response.go b/model/social_post_response.go index 811d791..e0765f5 100644 --- a/model/social_post_response.go +++ b/model/social_post_response.go @@ -53,6 +53,7 @@ type ResponseListSocialPostAdminInfo struct { SocialPosts []SocialPostAdminInfo `json:"socialPosts"` } +// SocialPostAdminInfo ... type SocialPostAdminInfo struct { ID primitive.ObjectID `json:"_id"` Title string `json:"title"` -- 2.34.1