Skip to content

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.

fix: Fix missing QuestionOrderCondFrequent

sy-records12275b622fa2
diff --git a/internal/schema/question_schema.go b/internal/schema/question_schema.go
index 45de312e..bf7dcc53 100644
--- a/internal/schema/question_schema.go
+++ b/internal/schema/question_schema.go
@@ -377,6 +377,7 @@ const (
QuestionOrderCondScore = "score"
QuestionOrderCondUnanswered = "unanswered"
QuestionOrderCondRecommend = "recommend"
+ QuestionOrderCondFrequent = "frequent"
// HotInDays limit max days of the hottest question
HotInDays = 90
diff --git a/internal/service/content/question_service.go b/internal/service/content/question_service.go
index 109b6b10..fb9634ad 100644
--- a/internal/service/content/question_service.go
+++ b/internal/service/content/question_service.go
@@ -1462,7 +1462,7 @@ func (qs *QuestionService) GetRecommendQuestionPage(ctx context.Context, req *sc
return nil, 0, err
}
- questions, err = qs.questioncommon.FormatQuestionsPage(ctx, questionList, req.LoginUserID, "frequent")
+ questions, err = qs.questioncommon.FormatQuestionsPage(ctx, questionList, req.LoginUserID, schema.QuestionOrderCondFrequent)
if err != nil {
return nil, 0, err
}