Skip to content

Commit

Permalink
Align external test slug-info flag
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-lamed committed Jul 3, 2024
1 parent cbe35f0 commit a6265c2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/uk/gov/hmrc/cataloguefrontend/model/Environment.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,7 @@ enum Environment(


given Parser[SlugInfoFlag] =
// TODO service-dependencies currently represents `external test` with a space
//Parser.parser(SlugInfoFlag.values)
(s: String) =>
if s == "external test"
then Right(SlugInfoFlag.ForEnvironment(Environment.ExternalTest))
else SlugInfoFlag.values
.find(_.asString == s)
.toRight(s"Invalid value: \"$s\" - should be one of: ${SlugInfoFlag.values.map(_.asString).mkString(", ")}")
Parser.parser(SlugInfoFlag.values)

trait SlugInfoFlag
extends FromString
Expand Down

0 comments on commit a6265c2

Please sign in to comment.