This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/answer.git
The following commit(s) were added to refs/heads/dev by this push:
new 12275b62 fix: Fix missing QuestionOrderCondFrequent
12275b62 is described below
commit 12275b622fa24f2d3d2f53718031635baa7e2f0a
Author: sy-records <[email protected]>
AuthorDate: Mon Mar 3 20:02:28 2025 +0800
fix: Fix missing QuestionOrderCondFrequent
---
internal/schema/question_schema.go | 1 +
internal/service/content/question_service.go | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
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
}