From 4c5971c16f7e8d91fa504398ee53a3892b138317 Mon Sep 17 00:00:00 2001 From: Sebastian Mihalache <sebastian.mihalache@gmail.con> Date: Mon, 4 Jun 2018 11:24:33 +0300 Subject: [PATCH] feat(component-manuscript-manager): add publish status --- .../routes/fragmentsRecommendations/post.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js index 65b20af20..27cb6f10d 100644 --- a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js +++ b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/post.js @@ -68,15 +68,16 @@ module.exports = models => async (req, res) => { collection, recommendation, ) - await userHelper.setupAuthorsEmailData({ - baseUrl, - UserModel: models.User, - collection, - mailService, - fragment: { title, submittingAuthor }, - comments: get(heRecommendation, 'comments'), - requestToRevision: false, - }) + if (recommendation !== 'publish') + await userHelper.setupAuthorsEmailData({ + baseUrl, + UserModel: models.User, + collection, + mailService, + fragment: { title, submittingAuthor }, + comments: get(heRecommendation, 'comments'), + requestToRevision: false, + }) } else if (recommendationType === 'editorRecommendation') { await collectionHelper.updateStatusByRecommendation( collection, -- GitLab