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
aichy483adb219802
diff --git a/internal/repo/answer_repo.go b/internal/repo/answer_repo.goindex 402ab3a7..e9e117b5 100644--- a/internal/repo/answer_repo.go+++ b/internal/repo/answer_repo.go@@ -184,7 +184,7 @@ func (ar *answerRepo) SearchList(ctx context.Context, search *entity.AnswerSearcsession = session.And("user_id = ?", search.UserID)}if search.Order == entity.Answer_Search_OrderBy_Time {- session = session.OrderBy("updated_at desc")+ session = session.OrderBy("created_at desc")} else if search.Order == entity.Answer_Search_OrderBy_Vote {session = session.OrderBy("vote_count desc")} else {@@ -194,7 +194,7 @@ func (ar *answerRepo) SearchList(ctx context.Context, search *entity.AnswerSearcsession = session.And("status = ?", entity.AnswerStatusAvailable)session = session.Limit(search.PageSize, offset)- count, err = session.OrderBy("updated_at desc").FindAndCount(&rows)+ count, err = session.FindAndCount(&rows)if err != nil {return rows, count, errors.InternalServer(reason.DatabaseError).WithError(err).WithStack()}