From f07b872ac6457a371f6fe56f09b5e1b27fc5d57e Mon Sep 17 00:00:00 2001 From: tangyongqiang Date: Wed, 3 Apr 2024 10:24:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/comment/builder.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/service/comment/builder.go b/service/comment/builder.go index 06e8db6..225b9c9 100644 --- a/service/comment/builder.go +++ b/service/comment/builder.go @@ -28,7 +28,8 @@ type CreateCommentReq struct { apiReq *core.APIReq } type CreateCommentReqBody struct { - Content string `json:"content"` + Content string `json:"content"` + RichText []interface{} `json:"rich_text"` } type CreateCommentResp struct { @@ -67,6 +68,10 @@ func (builder *CreateCommentReqBuilder) Content(content string) *CreateCommentRe builder.body.Content = content return builder } +func (builder *CreateCommentReqBuilder) RichText(richText []interface{}) *CreateCommentReqBuilder { + builder.body.RichText = richText + return builder +} func (builder *CreateCommentReqBuilder) Build() *CreateCommentReq { req := &CreateCommentReq{} req.apiReq = builder.apiReq From 74a441c1f9a79bd6f99d3f419de66c3bc9f19004 Mon Sep 17 00:00:00 2001 From: tangyongqiang Date: Wed, 3 Apr 2024 10:26:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/comment/builder.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/service/comment/builder.go b/service/comment/builder.go index 225b9c9..0a5f8c0 100644 --- a/service/comment/builder.go +++ b/service/comment/builder.go @@ -176,7 +176,8 @@ type UpdateCommentReq struct { apiReq *core.APIReq } type UpdateCommentReqBody struct { - Content string `json:"content"` + Content string `json:"content"` + RichText []interface{} `json:"rich_text"` } type UpdateCommentResp struct { @@ -218,6 +219,10 @@ func (builder *UpdateCommentReqBuilder) Content(content string) *UpdateCommentRe builder.body.Content = content return builder } +func (builder *UpdateCommentReqBuilder) RichText(richText []interface{}) *UpdateCommentReqBuilder { + builder.body.RichText = richText + return builder +} func (builder *UpdateCommentReqBuilder) Build() *UpdateCommentReq { req := &UpdateCommentReq{} req.apiReq = builder.apiReq