API.purs 496 Bytes
Newer Older
1 2
module Gargantext.Components.NgramsTable.API where

3
import Effect.Aff (Aff)
4
import Gargantext.Routes as GR
5
import Gargantext.Sessions (Session, post)
6 7 8 9 10 11 12 13 14 15 16 17
import Gargantext.Types as GT

type UpdateNodeListParams =
  (
    listId :: Int
  , nodeId :: Int
  , nodeType :: GT.TabSubType GT.CTabNgramType
  , session :: Session
  )

updateNodeList :: Record UpdateNodeListParams -> Aff Int
updateNodeList { listId, nodeId, nodeType, session } = post session (GR.RecomputeNgrams nodeType nodeId listId) {}