From 72c59b5a88d8ac25b7db30e49e5fef330e206501 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandre=20Delano=C3=AB?= <devel+git@delanoe.org>
Date: Thu, 16 May 2019 14:21:31 +0200
Subject: [PATCH] [RENAME] function

---
 src/Gargantext/Components/Search/Ajax.purs | 4 ++--
 src/Gargantext/Config.purs                 | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/Gargantext/Components/Search/Ajax.purs b/src/Gargantext/Components/Search/Ajax.purs
index 5a20b92e..e25cd58e 100644
--- a/src/Gargantext/Components/Search/Ajax.purs
+++ b/src/Gargantext/Components/Search/Ajax.purs
@@ -8,11 +8,11 @@ import DOM.Simple.Console
 import Gargantext.Types (toQuery)
 import Gargantext.Components.Search.Types (SearchQuery)
 import Gargantext.Config.REST (post)
-import Gargantext.Config (justgivemeafuckingurlplease, End(Back))
+import Gargantext.Config (urlPlease, End(Back))
 import URI.Query as Q
 
 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 q = do
diff --git a/src/Gargantext/Config.purs b/src/Gargantext/Config.purs
index 3e68ece1..88eba5cd 100644
--- a/src/Gargantext/Config.purs
+++ b/src/Gargantext/Config.purs
@@ -22,6 +22,10 @@ import Gargantext.Router as R
 
 import Gargantext.Types
 
+urlPlease :: End -> String -> String
+urlPlease end path = theEnd.baseUrl <> theEnd.prePath <> path
+  where theEnd = endOf end endConfig
+
 endConfig :: EndConfig
 endConfig = endConfig' V10
 
-- 
2.21.0