This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


The following commit(s) were added to refs/heads/dev by this push:
     new 84e08c56 fix: resolve 404 error on Tags static page
84e08c56 is described below

commit 84e08c567f97f51359020d992cd6c4f5e27e9ec3
Author: sy-records <[email protected]>
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)

Reply via email to