From 1b7dffc3a30b2244aa2690abce19dd4c31613016 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 12 Apr 2019 07:29:41 +0800 Subject: [PATCH] fix bug user search API pagesize didn't obey ExplorePagingNum (#6579) --- routers/api/v1/user/user.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index a44eb03c39..0f10c4e814 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -55,9 +55,6 @@ func Search(ctx *context.APIContext) { Type: models.UserTypeIndividual, PageSize: com.StrTo(ctx.Query("limit")).MustInt(), } - if opts.PageSize <= 0 { - opts.PageSize = 10 - } users, _, err := models.SearchUsers(opts) if err != nil {