Skip to content

Commit

Permalink
Merge pull request #200 from Viva-con-Agua/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
deinelieblings authored Jul 10, 2024
2 parents 1a194b4 + 51621a9 commit 95d9108
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dao/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ func UsersGet(i *models.UserQuery, token *vcapool.AccessToken) (result *[]models
defer cancel()
filter := i.PermittedFilter(token)
sort := i.Sort()
opt := options.Aggregate()
opt.SetCollation(&options.Collation{Locale: "en_US", NumericOrdering: true})

pipeline := models.SortedUserPermittedPipeline(token).SortFields(sort).Match(filter).Sort(sort).Skip(i.Skip, 0).Limit(i.Limit, 100).Pipe
result = new([]models.ListUser)
if err = UserCollection.Aggregate(ctx, pipeline, result, opt); err != nil {
if err = UserCollection.Aggregate(ctx, pipeline, result); err != nil {
return
}
ctx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
Expand Down

0 comments on commit 95d9108

Please sign in to comment.