fix: mongo uri connect

This commit is contained in:
a3d21 2023-12-26 14:52:49 +08:00
parent 47dd6b17f6
commit 7c505020aa

View File

@ -74,6 +74,10 @@ func buildMongoURI() string {
return uri
}
if config.Config.Mongo.Uri != "" {
return config.Config.Mongo.Uri
}
username := os.Getenv("MONGO_USERNAME")
password := os.Getenv("MONGO_PASSWORD")
address := os.Getenv("MONGO_ADDRESS")