diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-03-02 23:30:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 16:30:14 +0100 |
commit | dd712b77f7ccc0e3c3f1872c96dc120c20af0b08 (patch) | |
tree | 6b96634aa6fed42ee7d5ab2862a3f48b8ddafd64 /routers/web/explore | |
parent | a14b6f3aae196b2506e07f1dcfcd38d338b91e68 (diff) | |
download | gitea-dd712b77f7ccc0e3c3f1872c96dc120c20af0b08.tar.gz gitea-dd712b77f7ccc0e3c3f1872c96dc120c20af0b08.zip |
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
Diffstat (limited to 'routers/web/explore')
-rw-r--r-- | routers/web/explore/user.go | 4 |
1 files changed, 3 insertions, 1 deletions
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) |