Skip to content

Commit

Permalink
Ajout des return manquants
Browse files Browse the repository at this point in the history
Sinon la promise remonte en unhandledRejection
  • Loading branch information
ggrossetie authored Oct 24, 2022
1 parent 42ead4d commit d2f23b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions export/src/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ module.exports = {
const identifier = req.params.id
try {
const articleExportContext = await getArticleExportContext(identifier)
exportHtml({ ...articleExportContext, id: identifier }, res, req)
return exportHtml({ ...articleExportContext, id: identifier }, res, req)
} catch (e) {
if (e instanceof FindByIdNotFoundError) {
// it might be a version!
Expand All @@ -214,7 +214,7 @@ module.exports = {

try {
const articleExportContext = await getArticleExportContext(identifier)
await exportZip({ ...articleExportContext, id: identifier }, res, req)
return exportZip({ ...articleExportContext, id: identifier }, res, req)
} catch (e) {
if (e instanceof FindByIdNotFoundError) {
// it might be a version!
Expand Down

0 comments on commit d2f23b9

Please sign in to comment.