Commit c565aeda authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[api] user_id -> userId, parent_id -> parentId in decoding json

parent c9fdc900
......@@ -25,8 +25,8 @@ instance decodeNodePoly :: (DecodeJson a)
obj <- decodeJson json
id <- obj .: "id"
typename <- obj .: "typename"
userId <- obj .: "user_id"
parentId <- obj .: "parent_id"
userId <- obj .: "userId"
parentId <- obj .: "parentId"
name <- obj .: "name"
date <- obj .: "date"
......
......@@ -269,8 +269,8 @@ instance decodeAnnuaireInfo :: DecodeJson AnnuaireInfo where
obj <- decodeJson json
id <- obj .: "id"
typename <- obj .: "typename"
userId <- obj .: "user_id"
parentId <- obj .: "parent_id"
userId <- obj .: "userId"
parentId <- obj .: "parentId"
name <- obj .: "name"
date <- obj .: "date"
hyperdata <- obj .: "hyperdata"
......
......@@ -34,9 +34,9 @@ instance decodeNodeContact :: DecodeJson NodeContact where
hyperdata <- obj .: "hyperdata"
id <- obj .: "id"
name <- obj .:! "name"
parentId <- obj .?| "parent_id"
parentId <- obj .?| "parentId"
typename <- obj .?| "typename"
userId <- obj .:! "user_id"
userId <- obj .:! "userId"
pure $ NodeContact { id
, date
......@@ -70,9 +70,9 @@ instance decodeContact' :: DecodeJson Contact' where
hyperdata <- obj .: "hyperdata"
id <- obj .: "id"
name <- obj .:! "name"
parentId <- obj .?| "parent_id"
parentId <- obj .?| "parentId"
typename <- obj .?| "typename"
userId <- obj .:! "user_id"
userId <- obj .:! "userId"
pure $ Contact' { id
, date
......@@ -106,9 +106,9 @@ instance decodeContact :: DecodeJson Contact where
hyperdata <- obj .: "hyperdata"
id <- obj .: "id"
name <- obj .:! "name"
parentId <- obj .?| "parent_id"
parentId <- obj .?| "parentId"
typename <- obj .?| "typename"
userId <- obj .:! "user_id"
userId <- obj .:! "userId"
pure $ Contact { id
, date
......@@ -139,9 +139,9 @@ instance decodeUser :: DecodeJson User where
hyperdata <- obj .: "hyperdata"
id <- obj .: "id"
name <- obj .:! "name"
parentId <- obj .?| "parent_id"
parentId <- obj .?| "parentId"
typename <- obj .?| "typename"
userId <- obj .:! "user_id"
userId <- obj .:! "userId"
pure $ User { id
, date
......
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