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/incubator-answer.git
The following commit(s) were added to refs/heads/dev by this push:
new f93fd518 fix: display error message and HTML for invalid order
f93fd518 is described below
commit f93fd5181b7b475004f4cb34b74513cb6c7adb49
Author: sy-records <[email protected]>
AuthorDate: Fri Oct 18 15:55:45 2024 +0800
fix: display error message and HTML for invalid order
---
internal/controller/template_controller.go | 2 --
internal/schema/question_schema.go | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/internal/controller/template_controller.go
b/internal/controller/template_controller.go
index c3a2ff0a..4692e855 100644
--- a/internal/controller/template_controller.go
+++ b/internal/controller/template_controller.go
@@ -139,7 +139,6 @@ func (tc *TemplateController) Index(ctx *gin.Context) {
OrderCond: "newest",
}
if handler.BindAndCheck(ctx, req) {
- tc.Page404(ctx)
return
}
@@ -182,7 +181,6 @@ func (tc *TemplateController) QuestionList(ctx
*gin.Context) {
OrderCond: "newest",
}
if handler.BindAndCheck(ctx, req) {
- tc.Page404(ctx)
return
}
var page = req.Page
diff --git a/internal/schema/question_schema.go
b/internal/schema/question_schema.go
index 7c605765..de19a8a5 100644
--- a/internal/schema/question_schema.go
+++ b/internal/schema/question_schema.go
@@ -346,6 +346,7 @@ const (
QuestionOrderCondHot = "hot"
QuestionOrderCondScore = "score"
QuestionOrderCondUnanswered = "unanswered"
+ QuestionOrderCondRecommend = "recommend"
// HotInDays limit max days of the hottest question
HotInDays = 90