fix bug user search API pagesize didn't obey ExplorePagingNum (#6579)

tokarchuk/v1.17
Lunny Xiao 6 years ago committed by techknowlogick
parent 2f53b5f88c
commit 1b7dffc3a3
  1. 3
      routers/api/v1/user/user.go

@ -55,9 +55,6 @@ func Search(ctx *context.APIContext) {
Type: models.UserTypeIndividual, Type: models.UserTypeIndividual,
PageSize: com.StrTo(ctx.Query("limit")).MustInt(), PageSize: com.StrTo(ctx.Query("limit")).MustInt(),
} }
if opts.PageSize <= 0 {
opts.PageSize = 10
}
users, _, err := models.SearchUsers(opts) users, _, err := models.SearchUsers(opts)
if err != nil { if err != nil {

Loading…
Cancel
Save