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: display error message and HTML for invalid order
sy-recordsf93fd5181b7b
diff --git a/internal/controller/template_controller.go b/internal/controller/template_controller.goindex 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.Pagediff --git a/internal/schema/question_schema.go b/internal/schema/question_schema.goindex 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 questionHotInDays = 90