From dd712b77f7ccc0e3c3f1872c96dc120c20af0b08 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 2 Mar 2022 23:30:14 +0800 Subject: Refactor admin user filter query parameters (#18965) Only pass `status_filter` on admin page Use a more general method to pass query parameters, remove hard-coded keys --- routers/web/explore/user.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routers/web/explore') diff --git a/routers/web/explore/user.go b/routers/web/explore/user.go index c3aa89e8e6..98788f5433 100644 --- a/routers/web/explore/user.go +++ b/routers/web/explore/user.go @@ -82,7 +82,9 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions, pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) pager.SetDefaultParams(ctx) - pager.SetUserFilterParams(ctx) + for paramKey, paramVal := range opts.ExtraParamStrings { + pager.AddParamString(paramKey, paramVal) + } ctx.Data["Page"] = pager ctx.HTML(http.StatusOK, tplName) -- cgit v1.2.3