[toml] remove pubmed api key from config

It's set up in user settings instead and has been for a long time.
parent a0ec337b
...@@ -76,8 +76,7 @@ convertConfigs ini@(Ini.GargConfig { .. }) iniMail nlpConfig connInfo = ...@@ -76,8 +76,7 @@ convertConfigs ini@(Ini.GargConfig { .. }) iniMail nlpConfig connInfo =
, _jc_max_docs_scrapers = _gc_max_docs_scrapers , _jc_max_docs_scrapers = _gc_max_docs_scrapers
, _jc_js_job_timeout = _gc_js_job_timeout , _jc_js_job_timeout = _gc_js_job_timeout
, _jc_js_id_timeout = _gc_js_id_timeout } , _jc_js_id_timeout = _gc_js_id_timeout }
, _gc_apis = CTypes.APIsConfig { _ac_pubmed_api_key = _gc_pubmed_api_key , _gc_apis = CTypes.APIsConfig { _ac_epo_api_url = _gc_epo_api_url
, _ac_epo_api_url = _gc_epo_api_url
, _ac_scrapyd_url } , _ac_scrapyd_url }
, _gc_log_level = LevelDebug , _gc_log_level = LevelDebug
} }
......
...@@ -59,9 +59,6 @@ data_filepath = FILEPATH_TO_CHANGE ...@@ -59,9 +59,6 @@ data_filepath = FILEPATH_TO_CHANGE
[apis] [apis]
[apis.pubmed]
api_key = ENTER_PUBMED_API_KEY
[apis.epo] [apis.epo]
api_url = EPO_API_URL api_url = EPO_API_URL
......
...@@ -15,7 +15,6 @@ TODO-SECURITY: Critical ...@@ -15,7 +15,6 @@ TODO-SECURITY: Critical
module Gargantext.Core.Config.Types module Gargantext.Core.Config.Types
( APIsConfig(..) ( APIsConfig(..)
, ac_pubmed_api_key
, ac_epo_api_url , ac_epo_api_url
, ac_scrapyd_url , ac_scrapyd_url
, CORSOrigin(..) , CORSOrigin(..)
...@@ -299,13 +298,11 @@ makeLenses ''JobsConfig ...@@ -299,13 +298,11 @@ makeLenses ''JobsConfig
data APIsConfig = data APIsConfig =
APIsConfig { _ac_pubmed_api_key :: !Text APIsConfig { _ac_epo_api_url :: !Text
, _ac_epo_api_url :: !Text
, _ac_scrapyd_url :: !BaseUrl } , _ac_scrapyd_url :: !BaseUrl }
deriving (Generic, Show) deriving (Generic, Show)
instance FromValue APIsConfig where instance FromValue APIsConfig where
fromValue = parseTableFromValue $ do fromValue = parseTableFromValue $ do
_ac_pubmed_api_key <- reqKeyOf "pubmed" $ parseTableFromValue $ reqKey "api_key"
_ac_epo_api_url <- reqKeyOf "epo" $ parseTableFromValue $ reqKey "api_url" _ac_epo_api_url <- reqKeyOf "epo" $ parseTableFromValue $ reqKey "api_url"
scrapyd_url <- reqKeyOf "scrapyd" $ parseTableFromValue $ reqKey "url" scrapyd_url <- reqKeyOf "scrapyd" $ parseTableFromValue $ reqKey "url"
_ac_scrapyd_url <- _ac_scrapyd_url <-
...@@ -316,8 +313,7 @@ instance FromValue APIsConfig where ...@@ -316,8 +313,7 @@ instance FromValue APIsConfig where
instance ToValue APIsConfig where instance ToValue APIsConfig where
toValue = defaultTableToValue toValue = defaultTableToValue
instance ToTable APIsConfig where instance ToTable APIsConfig where
toTable (APIsConfig { .. }) = table [ "pubmed" .= table [ "api_key" .= _ac_pubmed_api_key ] toTable (APIsConfig { .. }) = table [ "epo" .= table [ "api_url" .= _ac_epo_api_url ]
, "epo" .= table [ "api_url" .= _ac_epo_api_url ]
, "scrapyd" .= table [ "url" .= showBaseUrl _ac_scrapyd_url ] , "scrapyd" .= table [ "url" .= showBaseUrl _ac_scrapyd_url ]
] ]
......
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