Skip to content

Commit

Permalink
add ServerAPIVersion1 to mongo config
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed May 16, 2022
1 parent 46f19c8 commit 091e253
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/db/mongodb/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ func (a *adapter) Open(jsonconfig json.RawMessage) error {
a.maxMessageResults = defaultMaxMessageResults
}

opts.SetServerAPIOptions(mdbopts.ServerAPI(mdbopts.ServerAPIVersion1))

// Connection string URI overrides any other options configured earlier.
if config.Uri != "" {
opts.ApplyURI(config.Uri)
// serverAPIOptions := mdbopts.ServerAPI(mdbopts.ServerAPIVersion1)
// opts.SetServerAPIOptions(serverAPIOptions)
}

// Make sure the options are sane.
Expand Down

0 comments on commit 091e253

Please sign in to comment.