Skip to content

Commit

Permalink
Merge pull request #331 from guardian/gl/add-primary/secondary-tags
Browse files Browse the repository at this point in the history
Add primary and secondary options to the list of tags
  • Loading branch information
Georges-GNM authored Oct 25, 2024
2 parents 934d144 + e6de7d0 commit d23c0fb
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ case class Backfill(

sealed trait Metadata

case object Primary extends Metadata

case object Secondary extends Metadata

case object Canonical extends Metadata

case object Special extends Metadata
Expand Down Expand Up @@ -47,6 +51,8 @@ case object SpecialReportAltPalette extends Metadata
object Metadata extends StrictLogging {

val tags: Map[String, Metadata] = Map(
"Primary" -> Primary,
"Secondary" -> Secondary,
"Canonical" -> Canonical,
"Special" -> Special,
"Breaking" -> Breaking,
Expand Down Expand Up @@ -78,6 +84,8 @@ object Metadata extends StrictLogging {
}

def writes(cardStyle: Metadata) = cardStyle match {
case Primary => JsObject(Seq("type" -> JsString("Primary")))
case Secondary => JsObject(Seq("type" -> JsString("Secondary")))
case Canonical => JsObject(Seq("type" -> JsString("Canonical")))
case Special => JsObject(Seq("type" -> JsString("Special")))
case Breaking => JsObject(Seq("type" -> JsString("Breaking")))
Expand Down

0 comments on commit d23c0fb

Please sign in to comment.