Skip to content

Commit

Permalink
context user get
Browse files Browse the repository at this point in the history
  • Loading branch information
deinelieblings committed Jul 10, 2024
1 parent 3cb1f10 commit a1dc0d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dao/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ func UsersGet(i *models.UserQuery, token *vcapool.AccessToken) (result *[]models
if err = UserCollection.Aggregate(ctx, pipeline, result, opt); err != nil {
return
}
ctx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
opts := options.Count().SetHint("_id_")
if i.FullCount != "true" {
opts.SetSkip(i.Skip).SetLimit(i.Limit)
Expand Down

0 comments on commit a1dc0d1

Please sign in to comment.