Commit 3a86dac5 authored by Loïc Chapron's avatar Loïc Chapron

FIX 'host' not found

parent c0a08d62
...@@ -55,7 +55,7 @@ data Document = Document ...@@ -55,7 +55,7 @@ data Document = Document
, _document_authors :: [Author] , _document_authors :: [Author]
, _document_abstract :: Maybe T.Text , _document_abstract :: Maybe T.Text
, _document_publicationDate :: Maybe Int , _document_publicationDate :: Maybe Int
, _document_sources :: Source , _document_sources :: Maybe Source
} deriving (Show, Generic) } deriving (Show, Generic)
L.makeLenses ''Document L.makeLenses ''Document
...@@ -65,7 +65,7 @@ instance FromJSON Document where ...@@ -65,7 +65,7 @@ instance FromJSON Document where
_document_title <- o .:? "title" _document_title <- o .:? "title"
_document_authors <- o .: "author" <|> pure [] _document_authors <- o .: "author" <|> pure []
_document_abstract <- o .:? "abstract" _document_abstract <- o .:? "abstract"
_document_sources <- o .: "host" _document_sources <- o .:? "host"
mPubDate <- o .:? "publicationDate" mPubDate <- o .:? "publicationDate"
pure $ Document { _document_publicationDate = parsePubDate mPubDate, .. } pure $ Document { _document_publicationDate = parsePubDate mPubDate, .. }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment