Skip to content

Commit

Permalink
Allow reshape to be disabled [elifesciences/enhanced-preprints-issues…
Browse files Browse the repository at this point in the history
  • Loading branch information
nlisgo committed Sep 20, 2024
1 parent 418bac9 commit ac9f600
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@ app.post('/', async (req, res) => {
const xmlFile = `${tempOutput}/article.xml`;
writeFileSync(xmlFile, xmlData);

const shouldReshape = req.query.reshape !== 'false';

const parameters = {
from: 'jats',
to: 'json',
encodeOptions: {
isBundle: false,
},
...!shouldReshape ? {
decodeOptions: {
shouldReshape,
},
} : {},
};

const replacementPath = typeof req.query.replacementPath === 'string' ? req.query.replacementPath : '';
Expand Down

0 comments on commit ac9f600

Please sign in to comment.