Refactor useless intermediate definitions

parent 6ef4fe73
......@@ -34,20 +34,10 @@ modeTabType Communication = PTabCommunication
type Props = NT.Props Contact Mode
-- TODO: Move to Components.NgramsTable
getTable :: { tabType :: TabType
, nodeId :: Int
, listIds :: Array Int
, offset :: Offset
, limit :: Limit }
-> Aff NT.VersionedNgramsTable
getTable {tabType, nodeId, listIds, offset, limit} =
get $ toUrl Back (GetNgrams tabType offset limit listIds Nothing) (Just nodeId)
-- TODO: Move to Components.NgramsTable
loadPage :: NT.PageParams -> Aff NT.VersionedNgramsTable
loadPage {nodeId, listIds, tabType, params: {offset, limit}} =
getTable {tabType, nodeId, listIds, offset, limit}
get $ toUrl Back (GetNgrams tabType offset limit listIds Nothing) (Just nodeId)
-- TODO this ignores orderBy
-- TODO: Move to Components.NgramsTable?
......
......@@ -35,19 +35,10 @@ modeTabType Sources = CTabSources
modeTabType Institutes = CTabInstitutes
modeTabType Terms = CTabTerms
getTable :: { tabType :: TabType
, nodeId :: Int
, listIds :: Array Int
, offset :: Offset
, limit :: Limit }
-> Aff NT.VersionedNgramsTable
getTable {tabType, nodeId, listIds, offset, limit} =
get $ toUrl Back (GetNgrams tabType offset limit listIds Nothing) (Just nodeId)
-- TODO: Move to Components.NgramsTable?
loadPage :: NT.PageParams -> Aff NT.VersionedNgramsTable
loadPage {nodeId, listIds, tabType, params: {offset, limit}} =
getTable {tabType, nodeId, listIds, offset, limit}
get $ toUrl Back (GetNgrams tabType offset limit listIds Nothing) (Just nodeId)
-- TODO this ignores orderBy
-- TODO: Move to Components.NgramsTable?
......
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