Skip to content
Snippets Groups Projects
Commit 584a1b37 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

fix(eqs-decision): do not send mail when rejecting, show the correct message

parent aa5b4d25
No related branches found
No related tags found
2 merge requests!21Sprint #16 features,!20fix(eqs-decision): do not send mail when rejecting, show the correct message
...@@ -40,12 +40,14 @@ module.exports = ({ Collection, Fragment, User }) => async (req, res) => { ...@@ -40,12 +40,14 @@ module.exports = ({ Collection, Fragment, User }) => async (req, res) => {
collection.status = setNewStatus(step, agree) collection.status = setNewStatus(step, agree)
await collection.save() await collection.save()
sendNotifications({ if (agree) {
User, sendNotifications({
Fragment, User,
collection, Fragment,
baseUrl: services.getBaseUrl(req), collection,
}) baseUrl: services.getBaseUrl(req),
})
}
return res.status(200).json(collection) return res.status(200).json(collection)
} catch (e) { } catch (e) {
......
...@@ -98,7 +98,9 @@ export default compose( ...@@ -98,7 +98,9 @@ export default compose(
}) })
.then(() => { .then(() => {
setSuccess( setSuccess(
'Manuscript accepted. Thank you for your technical check!', `Manuscript ${
decision ? 'accepted' : 'rejected'
}. Thank you for your technical check!`,
) )
hideModal() hideModal()
}) })
......
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