Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christian Merten
haskell-gargantext
Commits
b86d2e61
Verified
Commit
b86d2e61
authored
Oct 08, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[toml] remove pubmed api key from config
It's set up in user settings instead and has been for a long time.
parent
a0ec337b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
11 deletions
+3
-11
Ini.hs
bin/gargantext-cli/CLI/Ini.hs
+1
-2
gargantext-settings.toml_toModify
gargantext-settings.toml_toModify
+0
-3
Types.hs
src/Gargantext/Core/Config/Types.hs
+2
-6
No files found.
bin/gargantext-cli/CLI/Ini.hs
View file @
b86d2e61
...
...
@@ -76,8 +76,7 @@ convertConfigs ini@(Ini.GargConfig { .. }) iniMail nlpConfig connInfo =
,
_jc_max_docs_scrapers
=
_gc_max_docs_scrapers
,
_jc_js_job_timeout
=
_gc_js_job_timeout
,
_jc_js_id_timeout
=
_gc_js_id_timeout
}
,
_gc_apis
=
CTypes
.
APIsConfig
{
_ac_pubmed_api_key
=
_gc_pubmed_api_key
,
_ac_epo_api_url
=
_gc_epo_api_url
,
_gc_apis
=
CTypes
.
APIsConfig
{
_ac_epo_api_url
=
_gc_epo_api_url
,
_ac_scrapyd_url
}
,
_gc_log_level
=
LevelDebug
}
...
...
gargantext-settings.toml_toModify
View file @
b86d2e61
...
...
@@ -59,9 +59,6 @@ data_filepath = FILEPATH_TO_CHANGE
[apis]
[apis.pubmed]
api_key = ENTER_PUBMED_API_KEY
[apis.epo]
api_url = EPO_API_URL
...
...
src/Gargantext/Core/Config/Types.hs
View file @
b86d2e61
...
...
@@ -15,7 +15,6 @@ TODO-SECURITY: Critical
module
Gargantext.Core.Config.Types
(
APIsConfig
(
..
)
,
ac_pubmed_api_key
,
ac_epo_api_url
,
ac_scrapyd_url
,
CORSOrigin
(
..
)
...
...
@@ -299,13 +298,11 @@ makeLenses ''JobsConfig
data
APIsConfig
=
APIsConfig
{
_ac_pubmed_api_key
::
!
Text
,
_ac_epo_api_url
::
!
Text
APIsConfig
{
_ac_epo_api_url
::
!
Text
,
_ac_scrapyd_url
::
!
BaseUrl
}
deriving
(
Generic
,
Show
)
instance
FromValue
APIsConfig
where
fromValue
=
parseTableFromValue
$
do
_ac_pubmed_api_key
<-
reqKeyOf
"pubmed"
$
parseTableFromValue
$
reqKey
"api_key"
_ac_epo_api_url
<-
reqKeyOf
"epo"
$
parseTableFromValue
$
reqKey
"api_url"
scrapyd_url
<-
reqKeyOf
"scrapyd"
$
parseTableFromValue
$
reqKey
"url"
_ac_scrapyd_url
<-
...
...
@@ -316,8 +313,7 @@ instance FromValue APIsConfig where
instance
ToValue
APIsConfig
where
toValue
=
defaultTableToValue
instance
ToTable
APIsConfig
where
toTable
(
APIsConfig
{
..
})
=
table
[
"pubmed"
.=
table
[
"api_key"
.=
_ac_pubmed_api_key
]
,
"epo"
.=
table
[
"api_url"
.=
_ac_epo_api_url
]
toTable
(
APIsConfig
{
..
})
=
table
[
"epo"
.=
table
[
"api_url"
.=
_ac_epo_api_url
]
,
"scrapyd"
.=
table
[
"url"
.=
showBaseUrl
_ac_scrapyd_url
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment