feat(review): add url title for review page
This commit is contained in:
@@ -79,6 +79,7 @@ type GetReportListPageResp struct {
|
||||
CommentID string `json:"comment_id"`
|
||||
ObjectType string `json:"object_type" enums:"question,answer,comment"`
|
||||
Title string `json:"title"`
|
||||
UrlTitle string `json:"url_title"`
|
||||
OriginalText string `json:"original_text"`
|
||||
AnswerCount int `json:"answer_count"`
|
||||
AnswerAccepted bool `json:"answer_accepted"`
|
||||
|
||||
@@ -48,6 +48,7 @@ type GetUnreviewedPostPageResp struct {
|
||||
CommentID string `json:"comment_id"`
|
||||
ObjectType string `json:"object_type" enums:"question,answer,comment"`
|
||||
Title string `json:"title"`
|
||||
UrlTitle string `json:"url_title"`
|
||||
OriginalText string `json:"original_text"`
|
||||
Tags []*TagResp `json:"tags"`
|
||||
ObjectStatus int `json:"object_status"`
|
||||
|
||||
@@ -36,6 +36,7 @@ import (
|
||||
"github.com/apache/incubator-answer/internal/service/report_common"
|
||||
"github.com/apache/incubator-answer/internal/service/report_handle"
|
||||
usercommon "github.com/apache/incubator-answer/internal/service/user_common"
|
||||
"github.com/apache/incubator-answer/pkg/htmltext"
|
||||
"github.com/apache/incubator-answer/pkg/obj"
|
||||
"github.com/jinzhu/copier"
|
||||
"github.com/segmentfault/pacman/errors"
|
||||
@@ -136,6 +137,7 @@ func (rs *ReportService) GetUnreviewedReportPostPage(ctx context.Context, req *s
|
||||
AnswerID: info.AnswerID,
|
||||
CommentID: info.CommentID,
|
||||
Title: info.Title,
|
||||
UrlTitle: htmltext.UrlTitle(info.Title),
|
||||
OriginalText: info.Content,
|
||||
AnswerCount: info.AnswerCount,
|
||||
AnswerAccepted: info.AnswerAccepted,
|
||||
|
||||
@@ -34,6 +34,7 @@ import (
|
||||
"github.com/apache/incubator-answer/internal/service/role"
|
||||
tagcommon "github.com/apache/incubator-answer/internal/service/tag_common"
|
||||
usercommon "github.com/apache/incubator-answer/internal/service/user_common"
|
||||
"github.com/apache/incubator-answer/pkg/htmltext"
|
||||
"github.com/apache/incubator-answer/pkg/token"
|
||||
"github.com/apache/incubator-answer/pkg/uid"
|
||||
"github.com/apache/incubator-answer/plugin"
|
||||
@@ -357,6 +358,7 @@ func (cs *ReviewService) GetUnreviewedPostPage(ctx context.Context, req *schema.
|
||||
CommentID: info.CommentID,
|
||||
ObjectType: info.ObjectType,
|
||||
Title: info.Title,
|
||||
UrlTitle: htmltext.UrlTitle(info.Title),
|
||||
OriginalText: info.Content,
|
||||
Tags: info.Tags,
|
||||
ObjectStatus: info.Status,
|
||||
|
||||
Reference in New Issue
Block a user