feat(review): add parsed text for review page

This commit is contained in:
LinkinStars
2024-03-15 16:50:00 +08:00
parent 34660ee161
commit 3f2a617bbc
7 changed files with 52 additions and 0 deletions
+18
View File
@@ -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
+18
View File
@@ -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
+12
View File
@@ -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
+1
View File
@@ -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"`
+1
View File
@@ -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"`
@@ -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,
@@ -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,