Skip to content

Commit

Permalink
Do not allow to create ZMongoClient without ServerAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill5k committed Feb 11, 2024
1 parent 10d3354 commit d1c8476
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/zio/src/main/scala/mongo4cats/zio/ZMongoClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ object ZMongoClient extends AsJava {
}
}

def fromServerAddress(serverAddresses: ServerAddress*): RIO[Scope, ZMongoClient] =
def fromServerAddress(serverAddress: ServerAddress, serverAddresses: ServerAddress*): RIO[Scope, ZMongoClient] =
create {
MongoClientSettings
.builder()
.uuidRepresentation(UuidRepresentation.STANDARD)
.applyToClusterSettings { builder =>
val _ = builder.hosts(asJava(serverAddresses.toList))
val _ = builder.hosts(asJava(serverAddress :: serverAddresses.toList))
}
.build()
}
Expand Down

0 comments on commit d1c8476

Please sign in to comment.