Skip to content
Snippets Groups Projects
Commit 75b2aa99 authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

revert db credentials removal

parent c5a791a6
No related branches found
No related tags found
1 merge request!25Revert MongoDB credentials removal
Pipeline #51878 passed with stages
in 1 minute and 15 seconds
......@@ -56,7 +56,11 @@ func main() {
// connect to mongo db
db, err := mongo.Connect(
context.Background(),
options.Client().ApplyURI(cfg.Mongo.Addr))
options.Client().ApplyURI(cfg.Mongo.Addr).SetAuth(options.Credential{
Username: cfg.Mongo.User,
Password: cfg.Mongo.Pass,
}),
)
if err != nil {
logger.Fatal("error connecting to mongodb", zap.Error(err))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment