From 84e08c567f97f51359020d992cd6c4f5e27e9ec3 Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Mon, 28 Oct 2024 13:20:14 +0800 Subject: [PATCH] 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 4692e855f..df10931e0 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)