Skip to content

Commit

Permalink
feat: Vérification des types de courriels envoyés lors de l'envoi des…
Browse files Browse the repository at this point in the history
… mails de notification et de mise à jour
  • Loading branch information
QuentinPetel committed Jul 1, 2024
1 parent 298ed7e commit c9c2816
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion server/src/jobs/sendNotificationEmails.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ async function sendNotificationEmails(sendEmail, options = {}) {
unsubscribe: false,
statut: { $nin: [UserStatut.NON_CONCERNE] },

"emails.templateName": { $not: { $regex: "^notification_.*$" } },
$and: [
{ "emails.templateName": { $not: { $regex: "^notification_.*$" } } },
{ "emails.templateName": { $not: { $regex: "^update_.*$" } } },
],

$or: [
{
Expand Down
5 changes: 4 additions & 1 deletion server/src/jobs/sendUpdateEmails.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ async function sendUpdateEmails(sendEmail, options = {}) {
unsubscribe: false,
statut: { $nin: [UserStatut.NON_CONCERNE] },

"emails.templateName": { $not: { $regex: "^update_.*$" } },
$and: [
{ "emails.templateName": { $regex: "^notification_.*$" } },
{ "emails.templateName": { $not: { $regex: "^update_.*$" } } },
],

$or: [
{
Expand Down

0 comments on commit c9c2816

Please sign in to comment.