add pagination for admin api get orgs and fix only list public orgs bug (#7742) (#7752)

This commit is contained in:
Lunny Xiao authored and techknowlogick committed 2019-08-05 00:08:57 -04:00
1 parent 4f5dbc4d00
commit c6f1825fe9
3 files changed
+27 -4

No files matched your search

+1 -3
View File
@@ -1376,9 +1376,7 @@ type SearchUserOptions struct {
}
func (opts *SearchUserOptions) toConds() builder.Cond {
var cond = builder.NewCond()
cond = cond.And(builder.Eq{"type": opts.Type})
var cond builder.Cond = builder.Eq{"type": opts.Type}
if len(opts.Keyword) > 0 {
lowerKeyword := strings.ToLower(opts.Keyword)