Commit 21038fac authored by Alexandre Delanoë's avatar Alexandre Delanoë

[COSMETICS]

parent 93b6d5dc
...@@ -91,12 +91,12 @@ instance eqSessions :: Eq Sessions where ...@@ -91,12 +91,12 @@ instance eqSessions :: Eq Sessions where
instance decodeJsonSessions :: DecodeJson Sessions where instance decodeJsonSessions :: DecodeJson Sessions where
decodeJson json = do decodeJson json = do
ss <- decodeSessions' json ss <- decodeSessions json
pure (Sessions (Seq.fromFoldable ss)) pure (Sessions (Seq.fromFoldable ss))
where where
decodeSessions' :: Json -> Either String (Array Session) decodeSessions :: Json -> Either String (Array Session)
decodeSessions' json = decodeJson json >>= traverse decodeJson decodeSessions json = decodeJson json >>= traverse decodeJson
instance encodeJsonSessions :: EncodeJson Sessions where instance encodeJsonSessions :: EncodeJson Sessions where
encodeJson (Sessions ss) = "sessions" := (encodeSessions ss) encodeJson (Sessions ss) = "sessions" := (encodeSessions ss)
......
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