diff --git a/dao/users.go b/dao/users.go index 9ef0ac3..3d74dc4 100644 --- a/dao/users.go +++ b/dao/users.go @@ -51,7 +51,7 @@ func UsersGet(i *models.UserQuery, token *models.AccessToken) (result *[]models. count := vmod.Count{} var cErr error - if cErr = UserViewCollection.AggregateOne(context.Background(), models.UserPermittedPipeline(token).Match(filter).Count().Pipe, &count); cErr != nil { + if cErr = UserViewCollection.AggregateOne(context.Background(), models.UserPermittedPipeline(token).Match(filter).Limit(1000, 1000).Count().Pipe, &count); cErr != nil { log.Print(cErr) list_size = 1 } else {