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.
feat(review): add parsed text for review page
LinkinStars3f2a617bbc4a
diff --git a/docs/docs.go b/docs/docs.goindex 44320f78..086d660e 100644--- a/docs/docs.go+++ b/docs/docs.go@@ -7869,6 +7869,9 @@ const docTemplate = `{"original_text": {"type": "string"},+ "parsed_text": {+ "type": "string"+ },"question_id": {"type": "string"},@@ -7889,6 +7892,9 @@ const docTemplate = `{},"title": {"type": "string"+ },+ "url_title": {+ "type": "string"}}},@@ -8177,6 +8183,9 @@ const docTemplate = `{"original_text": {"type": "string"},+ "parsed_text": {+ "type": "string"+ },"question_id": {"type": "string"},@@ -8200,6 +8209,9 @@ const docTemplate = `{},"title": {"type": "string"+ },+ "url_title": {+ "type": "string"}}},@@ -9159,6 +9171,9 @@ const docTemplate = `{"site_url"],"properties": {+ "check_update": {+ "type": "boolean"+ },"contact_email": {"type": "string","maxLength": 512@@ -9189,6 +9204,9 @@ const docTemplate = `{"site_url"],"properties": {+ "check_update": {+ "type": "boolean"+ },"contact_email": {"type": "string","maxLength": 512diff --git a/docs/swagger.json b/docs/swagger.jsonindex e96e622a..4c7663de 100644--- a/docs/swagger.json+++ b/docs/swagger.json@@ -7857,6 +7857,9 @@"original_text": {"type": "string"},+ "parsed_text": {+ "type": "string"+ },"question_id": {"type": "string"},@@ -7877,6 +7880,9 @@},"title": {"type": "string"+ },+ "url_title": {+ "type": "string"}}},@@ -8165,6 +8171,9 @@"original_text": {"type": "string"},+ "parsed_text": {+ "type": "string"+ },"question_id": {"type": "string"},@@ -8188,6 +8197,9 @@},"title": {"type": "string"+ },+ "url_title": {+ "type": "string"}}},@@ -9147,6 +9159,9 @@"site_url"],"properties": {+ "check_update": {+ "type": "boolean"+ },"contact_email": {"type": "string","maxLength": 512@@ -9177,6 +9192,9 @@"site_url"],"properties": {+ "check_update": {+ "type": "boolean"+ },"contact_email": {"type": "string","maxLength": 512diff --git a/docs/swagger.yaml b/docs/swagger.yamlindex 6a794feb..204c5bce 100644--- a/docs/swagger.yaml+++ b/docs/swagger.yaml@@ -849,6 +849,8 @@ definitions:type: stringoriginal_text:type: string+ parsed_text:+ type: stringquestion_id:type: stringreason:@@ -863,6 +865,8 @@ definitions:type: arraytitle:type: string+ url_title:+ type: stringtype: objectschema.GetReviewingTypeResp:properties:@@ -1060,6 +1064,8 @@ definitions:type: stringoriginal_text:type: string+ parsed_text:+ type: stringquestion_id:type: stringreason:@@ -1076,6 +1082,8 @@ definitions:type: arraytitle:type: string+ url_title:+ type: stringtype: objectschema.GetUnreviewedRevisionResp:properties:@@ -1735,6 +1743,8 @@ definitions:type: objectschema.SiteGeneralReq:properties:+ check_update:+ type: booleancontact_email:maxLength: 512type: string@@ -1757,6 +1767,8 @@ definitions:type: objectschema.SiteGeneralResp:properties:+ check_update:+ type: booleancontact_email:maxLength: 512type: stringdiff --git a/internal/schema/report_schema.go b/internal/schema/report_schema.goindex 233ac058..a1574722 100644--- a/internal/schema/report_schema.go+++ b/internal/schema/report_schema.go@@ -81,6 +81,7 @@ type GetReportListPageResp struct {Title string `json:"title"`UrlTitle string `json:"url_title"`OriginalText string `json:"original_text"`+ ParsedText string `json:"parsed_text"`AnswerCount int `json:"answer_count"`AnswerAccepted bool `json:"answer_accepted"`Tags []*TagResp `json:"tags"`diff --git a/internal/schema/review_schema.go b/internal/schema/review_schema.goindex d9a78624..8c5ba0d6 100644--- a/internal/schema/review_schema.go+++ b/internal/schema/review_schema.go@@ -50,6 +50,7 @@ type GetUnreviewedPostPageResp struct {Title string `json:"title"`UrlTitle string `json:"url_title"`OriginalText string `json:"original_text"`+ ParsedText string `json:"parsed_text"`Tags []*TagResp `json:"tags"`ObjectStatus int `json:"object_status"`ObjectShowStatus int `json:"object_show_status"`diff --git a/internal/service/report/report_service.go b/internal/service/report/report_service.goindex e91217e9..a494be9d 100644--- a/internal/service/report/report_service.go+++ b/internal/service/report/report_service.go@@ -139,6 +139,7 @@ func (rs *ReportService) GetUnreviewedReportPostPage(ctx context.Context, req *sTitle: info.Title,UrlTitle: htmltext.UrlTitle(info.Title),OriginalText: info.Content,+ ParsedText: info.Html,AnswerCount: info.AnswerCount,AnswerAccepted: info.AnswerAccepted,Tags: info.Tags,diff --git a/internal/service/review/review_service.go b/internal/service/review/review_service.goindex 1c235a1a..2cd49997 100644--- a/internal/service/review/review_service.go+++ b/internal/service/review/review_service.go@@ -360,6 +360,7 @@ func (cs *ReviewService) GetUnreviewedPostPage(ctx context.Context, req *schema.Title: info.Title,UrlTitle: htmltext.UrlTitle(info.Title),OriginalText: info.Content,+ ParsedText: info.Html,Tags: info.Tags,ObjectStatus: info.Status,ObjectShowStatus: info.ShowStatus,