add legacy files
[gargantext.git] / src / Gargantext / Prelude / Config.hs
index a1e9e7f210cda4fdca80a35bb6674535ef91f08d..a22e9854d0f59c6aec20360d0aee390dd5208ee6 100644 (file)
@@ -23,9 +23,14 @@ import GHC.Generics (Generic)
 import Control.Lens (makeLenses)
 
 
-data GargConfig = GargConfig { _gc_masteruser       :: !Text
+data GargConfig = GargConfig { _gc_url              :: !Text
+                             , _gc_url_backend_api  :: !Text
+
+                             , _gc_masteruser       :: !Text
                              , _gc_secretkey        :: !Text
+
                              , _gc_datafilepath     :: !FilePath
+                             , _gc_repofilepath     :: !FilePath
 
                              , _gc_frame_write_url  :: !Text
                              , _gc_frame_calc_url   :: !Text
@@ -50,21 +55,29 @@ readConfig fp = do
         Left _   -> panic (pack $ "ERROR: add " <> x <> " to your gargantext.ini")
         Right p' -> p'
 
-  pure $ GargConfig (val "MASTER_USER")
+  pure $ GargConfig (val "URL")
+                    (val "URL_BACKEND_API")
+                    (val "MASTER_USER")
                     (val "SECRET_KEY")
                     (cs $ val "DATA_FILEPATH")
+                    (cs $ val "REPO_FILEPATH")
                     (val "FRAME_WRITE_URL")
                     (val "FRAME_CALC_URL")
                     (val "FRAME_SEARX_URL")
                     (val "FRAME_ISTEX_URL")
                     (read $ cs $ val "MAX_DOCS_SCRAPERS")
 
+{- UNUSED
 defaultConfig :: GargConfig
-defaultConfig = GargConfig "gargantua"
+defaultConfig = GargConfig "https://localhost"
+                           "https://localhost:8008/api/v1.0"
+                           "gargantua"
                            "secret"
                            "data"
+                           "repos/"
                            "https://frame_write.url"
                            "https://frame_calc.url"
                            "https://frame_searx.url"
                            "https://frame_istex.url"
                            1000
+-}
\ No newline at end of file