make thumb optional

This commit is contained in:
Rhiannon Morris 2020-07-15 11:34:56 +02:00
parent cf999d19b6
commit d342fc6971

View file

@ -27,7 +27,7 @@ data Info =
nsfwTags :: ![Text], nsfwTags :: ![Text],
description :: !(Maybe Text), description :: !(Maybe Text),
images :: ![Image], images :: ![Image],
thumb :: !Text, thumb :: !(Maybe Text),
links :: ![Link] links :: ![Link]
} }
deriving (Eq, Show) deriving (Eq, Show)
@ -71,7 +71,7 @@ instance FromYAML Info where
<*> m .:? "nsfw-tags" .!= [] <*> m .:? "nsfw-tags" .!= []
<*> m .:? "description" <*> m .:? "description"
<*> m .: "images" <*> m .: "images"
<*> m .: "thumb" <*> m .:? "thumb"
<*> m .:? "links" .!= [] <*> m .:? "links" .!= []
instance FromYAML Artist where instance FromYAML Artist where