Skip to content
Snippets Groups Projects
Commit da381ea4 authored by Mihail Hagiu's avatar Mihail Hagiu
Browse files

fix(AuthorEmailHERemoved):

parent d5de6ad4
No related branches found
No related tags found
3 merge requests!196S25 - EiC submit revision,!189S25,!170feat(AuthorEmailHERemoved): Created email template and code for sending it
......@@ -99,9 +99,9 @@ module.exports = models => async (req, res) => {
await deleteFilesS3({ fileKeys, s3Config })
}
let shouldEmailBeSent
let shouldAuthorBeNotified
if (fragment.invitations.length > 0) {
shouldEmailBeSent = true
shouldAuthorBeNotified = true
}
fragment.invitations = []
......@@ -109,7 +109,7 @@ module.exports = models => async (req, res) => {
fragment.revision && delete fragment.revision
await fragment.save()
if (shouldEmailBeSent) {
if (shouldAuthorBeNotified) {
notifications.notifyAuthorWhenHERemoved({
models,
collection,
......
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