mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-05-15 04:50:59 +02:00
get rid of this stupid file
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
package models
|
||||
import software.amazon.awssdk.services.dynamodb.model.AttributeValue
|
||||
import spray.json._
|
||||
|
||||
case class OperatorInfo(wikidataId: String, transparencyPortalUrl: String)
|
||||
|
||||
object OperatorInfoJsonProtocol extends DefaultJsonProtocol {
|
||||
implicit val operatorInfoFormat: RootJsonFormat[OperatorInfo] = jsonFormat2(OperatorInfo)
|
||||
|
||||
def fromAttributeValueMap(map: Map[String, AttributeValue]): Option[OperatorInfo] = {
|
||||
for {
|
||||
wikidataId <- map.get("wikidataId").flatMap(attr => Option(attr.s()))
|
||||
transparencyPortalUrl <- map.get("transparencyPortalUrl").flatMap(attr => Option(attr.s()))
|
||||
} yield OperatorInfo(wikidataId, transparencyPortalUrl)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user