You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by li...@apache.org on 2024/12/09 03:52:29 UTC
(incubator-answer) 04/38: fix: resolve 404 error on Tags static page
This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit 68570d727119936c9e40becc4f14f7899cef9da7
Author: sy-records <52...@qq52o.cn>
AuthorDate: Mon Oct 28 13:20:14 2024 +0800
fix: resolve 404 error on Tags static page
---
internal/controller/template_controller.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/internal/controller/template_controller.go b/internal/controller/template_controller.go
index 4692e855..df10931e 100644
--- a/internal/controller/template_controller.go
+++ b/internal/controller/template_controller.go
@@ -449,13 +449,13 @@ func (tc *TemplateController) QuestionInfo(ctx *gin.Context) {
// TagList tags list
func (tc *TemplateController) TagList(ctx *gin.Context) {
- req := &schema.GetTagWithPageReq{}
+ req := &schema.GetTagWithPageReq{
+ PageSize: constant.DefaultPageSize,
+ Page: 1,
+ }
if handler.BindAndCheck(ctx, req) {
return
}
- if req.PageSize == 0 {
- req.PageSize = constant.DefaultPageSize
- }
data, err := tc.templateRenderController.TagList(ctx, req)
if err != nil || pager.ValPageOutOfRange(data.Count, req.Page, req.PageSize) {
tc.Page404(ctx)