Skip to content

Commit

Permalink
clean up sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-mack committed Jan 9, 2025
1 parent e64dba6 commit 35ba496
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/includes/authentication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ auto client = mongocxx::client(uri);

// start-auth-err
try {
auto uri = mongocxx::uri("<Your chosen auth method>");
auto uri = mongocxx::uri("<connection string>");
auto client = mongocxx::client(uri);

client["db"].run_command("<Any command requiring authorization>");
client["db"].run_command(<any command requiring authorization>);

} catch (const mongocxx::exception& ex) {
std::cerr << "Error: " << ex.what() << std::endl;
}
Expand Down

0 comments on commit 35ba496

Please sign in to comment.