Skip to content

Commit

Permalink
fix: validate cluster id
Browse files Browse the repository at this point in the history
  • Loading branch information
cipriansofronia committed Aug 14, 2023
1 parent e1c6948 commit 02777ec
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ object ClustersService {

def addCluster(request: ClusterDetails): ZIO[Env, Status, ClusterDetails] =
for {
clusterId <- genRandStr(6).map(str => s"${request.name.trim}-$str")
clusterId <- genRandStr(6)
.map(str => s"${request.name.trim.replaceAll(" ", "-")}-$str")
hosts = request.kafkaHosts.split(",").toList
schemaRegistry = Option.unless(request.schemaRegistryUrl.isEmpty)(request.schemaRegistryUrl)
c <- ClustersConfig
Expand Down

0 comments on commit 02777ec

Please sign in to comment.