Skip to content

Commit

Permalink
Merge Find() options into query body
Browse files Browse the repository at this point in the history
  • Loading branch information
flimzy committed Jul 17, 2024
1 parent d1e7011 commit 163a7ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions find.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ func toQuery(query interface{}, options ...Option) (json.RawMessage, error) {
return nil, &errors.Error{Status: http.StatusBadRequest, Err: err}
}

opts := map[string]interface{}{}
multiOptions(options).Apply(opts)

for k, v := range opts {
queryObject[k] = v
}

return json.Marshal(queryObject)
}

Expand Down

0 comments on commit 163a7ce

Please sign in to comment.