[User] avoid fetching a default list on users

parent f3db1b83
...@@ -182,12 +182,14 @@ layoutUser' = simpleSpec defaultPerformAction render ...@@ -182,12 +182,14 @@ layoutUser' = simpleSpec defaultPerformAction render
getContact :: Int -> Aff ContactData getContact :: Int -> Aff ContactData
getContact id = do getContact id = do
contactNode <- get $ toUrl Back Node $ Just id contactNode <- get $ toUrl Back Node $ Just id
defaultListIds <- get $ toUrl Back (Children NodeList 0 1 Nothing) $ Just id -- TODO: we need a default list for the pairings
case (head defaultListIds :: Maybe (NodePoly HyperdataList)) of --defaultListIds <- get $ toUrl Back (Children NodeList 0 1 Nothing) $ Just id
Just (NodePoly { id: defaultListId }) -> --case (head defaultListIds :: Maybe (NodePoly HyperdataList)) of
pure {contactNode, defaultListId} -- Just (NodePoly { id: defaultListId }) ->
Nothing -> -- pure {contactNode, defaultListId}
throwError $ error "Missing default list" -- Nothing ->
-- throwError $ error "Missing default list"
pure {contactNode, defaultListId: 424242}
-- | Change name for you -- | Change name for you
contactLoaderClass :: ReactClass (Loader.Props Int ContactData) contactLoaderClass :: ReactClass (Loader.Props Int ContactData)
......
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