[DOCS] Some fixes for favorites and deletes

parent ce5135f4
...@@ -51,5 +51,10 @@ put url = send PUT url <<< Just ...@@ -51,5 +51,10 @@ put url = send PUT url <<< Just
delete :: forall a. DecodeJson a => String -> Aff a delete :: forall a. DecodeJson a => String -> Aff a
delete url = send DELETE url noReqBody delete url = send DELETE url noReqBody
-- This might not be a good idea:
-- https://stackoverflow.com/questions/14323716/restful-alternatives-to-delete-request-body
deleteWithBody :: forall a b. EncodeJson a => DecodeJson b => String -> a -> Aff b
deleteWithBody url = send DELETE url <<< Just
post :: forall a b. EncodeJson a => DecodeJson b => String -> a -> Aff b post :: forall a b. EncodeJson a => DecodeJson b => String -> a -> Aff b
post url = send POST url <<< Just post url = send POST url <<< Just
module Gargantext.Pages.Corpus.Tabs.States where module Gargantext.Pages.Corpus.Tabs.States where
import Data.Lens (Lens', lens) import Data.Lens (Lens', lens)
import Gargantext.Prelude
import Gargantext.Pages.Corpus.Tabs.Documents as D import Gargantext.Pages.Corpus.Tabs.Documents as D
import Gargantext.Pages.Corpus.Tabs.Ngrams.NgramsTable as N import Gargantext.Pages.Corpus.Tabs.Ngrams.NgramsTable as N
import Gargantext.Components.Tab as Tab import Gargantext.Components.Tab as Tab
...@@ -15,10 +16,7 @@ type State = ...@@ -15,10 +16,7 @@ type State =
initialState :: {} -> State initialState :: {} -> State
initialState _ = initialState _ =
{ docsView : { docsView :
{ documents : D.sampleData' { documentIdsToDelete : mempty
, deleteRows : false
, deleteRowId : []
, delete : []
} }
, ngramsView : {} -- N.initialState , ngramsView : {} -- N.initialState
, activeTab : 0 , activeTab : 0
......
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