Commit 72c59b5a authored by Alexandre Delanoë's avatar Alexandre Delanoë

[RENAME] function

parent 7e937f5b
...@@ -8,11 +8,11 @@ import DOM.Simple.Console ...@@ -8,11 +8,11 @@ import DOM.Simple.Console
import Gargantext.Types (toQuery) import Gargantext.Types (toQuery)
import Gargantext.Components.Search.Types (SearchQuery) import Gargantext.Components.Search.Types (SearchQuery)
import Gargantext.Config.REST (post) import Gargantext.Config.REST (post)
import Gargantext.Config (justgivemeafuckingurlplease, End(Back)) import Gargantext.Config (urlPlease, End(Back))
import URI.Query as Q import URI.Query as Q
searchUrl :: SearchQuery -> String searchUrl :: SearchQuery -> String
searchUrl q = justgivemeafuckingurlplease Back $ "search" <> Q.print (toQuery q) searchUrl q = urlPlease Back $ "search" <> Q.print (toQuery q)
search :: forall a. DecodeJson a => SearchQuery -> Aff a search :: forall a. DecodeJson a => SearchQuery -> Aff a
search q = do search q = do
......
...@@ -22,6 +22,10 @@ import Gargantext.Router as R ...@@ -22,6 +22,10 @@ import Gargantext.Router as R
import Gargantext.Types import Gargantext.Types
urlPlease :: End -> String -> String
urlPlease end path = theEnd.baseUrl <> theEnd.prePath <> path
where theEnd = endOf end endConfig
endConfig :: EndConfig endConfig :: EndConfig
endConfig = endConfig' V10 endConfig = endConfig' V10
......
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