Commit d44dbe43 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] Editor JSON filtered for Lists and Texts

parent dec4588c
......@@ -65,12 +65,15 @@ data FieldType =
, text :: MarkdownText
}
isJSON :: FieldType -> Boolean
isJSON (JSON _) = true
isJSON _ = false
isJSON :: Field FieldType -> Boolean
isJSON (Field {typ}) = isJSON' typ
where
isJSON' (JSON _) = true
isJSON' _ = false
getCorpusInfo :: List.List (Field FieldType) -> CorpusInfo
getCorpusInfo as = case List.head as of
getCorpusInfo as = case List.head (List.filter isJSON as) of
Just (Field {typ: JSON {authors, desc,query,title}}) -> CorpusInfo { title
, desc
, query
......
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