Skip to content
Snippets Groups Projects
Commit d89b7c75 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

Merge branch 'develop' of https://gitlab.coko.foundation/xpub/xpub-faraday into develop

parents c1fffce9 b9a04f75
No related branches found
No related tags found
1 merge request!10Sprint #12
......@@ -45,7 +45,8 @@ module.exports = models => async (req, res) => {
user,
mailService,
})
await collectionHelper.updateStatus(collection, 'reviewCompleted')
if (collection.status !== 'pendingApproval')
await collectionHelper.updateStatus(collection, 'reviewCompleted')
}
await fragment.save()
return res.status(200).json(recommendation)
......
......@@ -50,7 +50,10 @@ module.exports = models => async (req, res) => {
newRecommendation.recommendation = recommendation || undefined
newRecommendation.comments = comments || undefined
if (recommendation === 'reject')
if (
['reject', 'publish'].includes(recommendation) &&
recommendationType === 'editorRecommendation'
)
await collectionHelper.updateStatus(collection, 'pendingApproval')
fragment.recommendations.push(newRecommendation)
......
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