Skip to content

Commit

Permalink
fix: resolve 404 error on Tags static page
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored and shuashuai committed Oct 28, 2024
1 parent 7c677f3 commit 84e08c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/controller/template_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 84e08c5

Please sign in to comment.