From 637aee5c32f523408c51a4c73c85cee66f8140a3 Mon Sep 17 00:00:00 2001 From: Dennis Kleber Date: Wed, 10 Jul 2024 10:52:43 +0200 Subject: [PATCH] user options --- dao/users.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dao/users.go b/dao/users.go index e4fe7ce..7d33a12 100644 --- a/dao/users.go +++ b/dao/users.go @@ -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)