Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
plugins
drug-reactions
Commits
755421b8
Commit
755421b8
authored
Nov 22, 2018
by
David Hoksza
Browse files
promise
parent
43db5359
Pipeline
#7588
passed with stages
in 1 minute and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/js/index.js
View file @
755421b8
...
...
@@ -379,13 +379,11 @@ function initDrugBioEntities(){
drugNames
=
getDrugs
(
globals
.
adrData
);
const
promisses
=
drugNames
.
map
(
d
=>
queryMinervaApi
(
`projects/
${
minervaProxy
.
project
.
data
.
getProjectId
()}
/drugs:search?query=
${
d
}
`
).
then
(
function
(
x
)
{
return
Promise
.
resolve
(
x
);
},
function
()
{
return
Promise
.
resolve
(
undefined
);
}
)
queryMinervaApi
(
`projects/
${
minervaProxy
.
project
.
data
.
getProjectId
()}
/drugs:search?query=
${
d
}
`
).
then
(
function
(
data
,
textStatus
,
jqXHR
)
{
return
data
;
},
function
(
jqXHR
,
textStatus
,
errorThrown
)
{
return
undefined
;
})
);
return
Promise
.
all
(
promisses
);
...
...
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