Skip to content

Commit

Permalink
Merge branch 'dev' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkinStars committed Oct 18, 2024
2 parents fe1576b + bc8c699 commit 07e80ab
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions internal/controller/template_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ func (tc *TemplateController) Index(ctx *gin.Context) {
OrderCond: "newest",
}
if handler.BindAndCheck(ctx, req) {
tc.Page404(ctx)
return
}

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/repo/question/question_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ func (qr *questionRepo) UpdateQuestionLinkStatus(ctx context.Context, status int
func (qr *questionRepo) GetQuestionLink(ctx context.Context, page, pageSize int, questionID string, orderCond string, inDays int) (questionList []*entity.Question, total int64, err error) {
questionList = make([]*entity.Question, 0)
questionID = uid.DeShortID(questionID)
questionStatus := []int{entity.QuestionStatusAvailable, entity.QuestionStatusPending}
questionStatus := []int{entity.QuestionStatusAvailable, entity.QuestionStatusClosed, entity.QuestionStatusPending}
if questionID == "0" {
return nil, 0, errors.InternalServer(reason.DatabaseError).WithError(
fmt.Errorf("questionID is empty"),
Expand Down
1 change: 1 addition & 0 deletions internal/schema/question_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ const (
QuestionOrderCondHot = "hot"
QuestionOrderCondScore = "score"
QuestionOrderCondUnanswered = "unanswered"
QuestionOrderCondRecommend = "recommend"

// HotInDays limit max days of the hottest question
HotInDays = 90
Expand Down

0 comments on commit 07e80ab

Please sign in to comment.