Commit d904d0c0 authored by ahamelers's avatar ahamelers
Browse files
parent 0b199ade
Pipeline #12826 passed with stages
in 5 minutes and 30 seconds
......@@ -43,16 +43,18 @@ module.exports.createGrantLinks = async function createGrantLinks(
if (sendManuscripts.length > 0) {
let contents = `<?xml version="1.0" encoding="UTF-8"?>
<grants file="${filename}">`
await Promise.all(
const grantsLists = await Promise.all(
sendManuscripts.map(async each => {
contents += await createGrantXML(
const grantList = await createGrantXML(
each.articleIds,
each.fundingGroup,
each.removeFundingGroup,
)
logger.info(`${each.id} Grant list created`)
return grantList
}),
)
contents += grantsLists.join('\n')
contents += '</grants>'
await sendXML(contents, filename)
logger.info(`Grant list sent to NCBI`)
......
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