Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add primary and secondary options to the list of tags #331

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading