Commit ffda1747 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/430-dev-doc-histogram' into dev-merge

parents 4c9f4b3b e4c0ac4d
...@@ -46,7 +46,7 @@ import Gargantext.Types (ListId, NodeID, NodeType(..), OrderBy(..), SidePanelSta ...@@ -46,7 +46,7 @@ import Gargantext.Types (ListId, NodeID, NodeType(..), OrderBy(..), SidePanelSta
import Gargantext.Types as GT import Gargantext.Types as GT
import Gargantext.Utils (sortWith, (?)) import Gargantext.Utils (sortWith, (?))
import Gargantext.Utils.CacheAPI as GUC import Gargantext.Utils.CacheAPI as GUC
import Gargantext.Utils.QueryString (joinQueryStrings, mQueryParam, mQueryParamS, queryParam, queryParamS) import Gargantext.Utils.QueryString (joinQueryStrings, mQueryParam, mQueryParamS, mQueryParamS', queryParam, queryParamS)
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as GUT import Gargantext.Utils.Toestand as GUT
import Gargantext.Utils.Toestand as T2 import Gargantext.Utils.Toestand as T2
...@@ -709,7 +709,7 @@ tableRouteWithPage { listId, nodeId, params: { limit, offset, orderBy, searchTyp ...@@ -709,7 +709,7 @@ tableRouteWithPage { listId, nodeId, params: { limit, offset, orderBy, searchTyp
st = queryParam "searchType" searchType st = queryParam "searchType" searchType
tt = queryParamS "tabType" (showTabType' tabType) tt = queryParamS "tabType" (showTabType' tabType)
q = queryParamS "query" query q = queryParamS "query" query
y = mQueryParam "year" yearFilter y = mQueryParamS' "year" yearFilter
deleteAllDocuments :: Session -> Int -> AffRESTError (Array Int) deleteAllDocuments :: Session -> Int -> AffRESTError (Array Int)
deleteAllDocuments session = delete session <<< documentsRoute deleteAllDocuments session = delete session <<< documentsRoute
......
...@@ -20,6 +20,10 @@ mQueryParamS :: forall a. String -> (a -> String) -> Maybe a -> String ...@@ -20,6 +20,10 @@ mQueryParamS :: forall a. String -> (a -> String) -> Maybe a -> String
mQueryParamS _ _ Nothing = "" mQueryParamS _ _ Nothing = ""
mQueryParamS key mFunc (Just v) = queryParamS key $ mFunc v mQueryParamS key mFunc (Just v) = queryParamS key $ mFunc v
mQueryParamS' :: String -> Maybe String -> String
mQueryParamS' _ Nothing = ""
mQueryParamS' key (Just v) = queryParamS key v
joinQueryStrings :: Array String -> String joinQueryStrings :: Array String -> String
joinQueryStrings qs = joinQueryStrings qs =
case uncons qs of case uncons qs of
......
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