fixed
This commit is contained in:
@ -79,7 +79,7 @@ func connectToMongo() (*mongo.Client, error) {
|
||||
}
|
||||
|
||||
var result bson.M
|
||||
if err = client.Database("Test").RunCommand(context.TODO(), bson.D{{Key: "ping", Value: 1}}).Decode(&result); err != nil {
|
||||
if err = client.Database("admin").RunCommand(context.TODO(), bson.D{{Key: "ping", Value: 1}}).Decode(&result); err != nil {
|
||||
log.Println("Error ping:", err)
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user