You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by li...@apache.org on 2024/03/15 08:50:29 UTC
(incubator-answer) branch feat/1.3.0/review updated: feat(review): add parsed text for review page
This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch feat/1.3.0/review
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/feat/1.3.0/review by this push:
new 3f2a617b feat(review): add parsed text for review page
3f2a617b is described below
commit 3f2a617bbc4abfd5b62997abcc6bba3686f8a60f
Author: LinkinStars <li...@foxmail.com>
AuthorDate: Fri Mar 15 16:50:00 2024 +0800
feat(review): add parsed text for review page
---
docs/docs.go | 18 ++++++++++++++++++
docs/swagger.json | 18 ++++++++++++++++++
docs/swagger.yaml | 12 ++++++++++++
internal/schema/report_schema.go | 1 +
internal/schema/review_schema.go | 1 +
internal/service/report/report_service.go | 1 +
internal/service/review/review_service.go | 1 +
7 files changed, 52 insertions(+)
diff --git a/docs/docs.go b/docs/docs.go
index 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": 512
diff --git a/docs/swagger.json b/docs/swagger.json
index 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": 512
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 6a794feb..204c5bce 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -849,6 +849,8 @@ definitions:
type: string
original_text:
type: string
+ parsed_text:
+ type: string
question_id:
type: string
reason:
@@ -863,6 +865,8 @@ definitions:
type: array
title:
type: string
+ url_title:
+ type: string
type: object
schema.GetReviewingTypeResp:
properties:
@@ -1060,6 +1064,8 @@ definitions:
type: string
original_text:
type: string
+ parsed_text:
+ type: string
question_id:
type: string
reason:
@@ -1076,6 +1082,8 @@ definitions:
type: array
title:
type: string
+ url_title:
+ type: string
type: object
schema.GetUnreviewedRevisionResp:
properties:
@@ -1735,6 +1743,8 @@ definitions:
type: object
schema.SiteGeneralReq:
properties:
+ check_update:
+ type: boolean
contact_email:
maxLength: 512
type: string
@@ -1757,6 +1767,8 @@ definitions:
type: object
schema.SiteGeneralResp:
properties:
+ check_update:
+ type: boolean
contact_email:
maxLength: 512
type: string
diff --git a/internal/schema/report_schema.go b/internal/schema/report_schema.go
index 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.go
index 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.go
index 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 *s
Title: 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.go
index 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,