diff --git a/backend/src/middleware/helpers/email/sendMail.js b/backend/src/middleware/helpers/email/sendMail.js index 2aa042bcd..a25938a14 100644 --- a/backend/src/middleware/helpers/email/sendMail.js +++ b/backend/src/middleware/helpers/email/sendMail.js @@ -9,7 +9,7 @@ let sendMailCallback = async () => {} if (!hasEmailConfig) { if (!CONFIG.TEST) { // eslint-disable-next-line no-console - console.log('Warning: Middlewares will not try to send mails.') // Wolle + console.log('Warning: Middlewares will not try to send mails.') } } else { sendMailCallback = async (templateArgs) => { diff --git a/backend/src/middleware/helpers/email/templateBuilder.js b/backend/src/middleware/helpers/email/templateBuilder.js index d71202d45..8098b38fe 100644 --- a/backend/src/middleware/helpers/email/templateBuilder.js +++ b/backend/src/middleware/helpers/email/templateBuilder.js @@ -68,15 +68,6 @@ export const resetPasswordTemplate = ({ email, nonce, name }) => { actionUrl.searchParams.set('nonce', nonce) actionUrl.searchParams.set('email', email) - // Wolle - // console.log( - // mustache.render( - // templates.layout, - // { ...defaultParams, englishHint, actionUrl, name, nonce, subject }, - // { content: templates.passwordReset }, - // ), - // ) - return { from, to: email, @@ -123,10 +114,6 @@ export const notificationTemplate = ({ email, notification }) => { } const subjectUnrendered = content.split('\n')[0].split('"')[1] const subject = mustache.render(subjectUnrendered, renderParams, {}) - // Wolle console.log('subject: ', subject) - - // Wolle - // console.log(mustache.render(templates.layout, renderParams, { content })) return { from, diff --git a/backend/src/middleware/notifications/notificationsMiddleware.js b/backend/src/middleware/notifications/notificationsMiddleware.js index af7cf19f9..2bc53ab7c 100644 --- a/backend/src/middleware/notifications/notificationsMiddleware.js +++ b/backend/src/middleware/notifications/notificationsMiddleware.js @@ -4,8 +4,7 @@ import { validateNotifyUsers } from '../validation/validationMiddleware' import { sendMail } from '../helpers/email/sendMail' import { notificationTemplate } from '../helpers/email/templateBuilder' -// Wolle -> queryNotificationEmails -const queryNotificationsEmails = async (context, notificationUserIds) => { +const queryNotificationEmails = async (context, notificationUserIds) => { if (!(notificationUserIds && notificationUserIds.length)) return [] const userEmailCypher = ` MATCH (user: User) @@ -35,7 +34,7 @@ const queryNotificationsEmails = async (context, notificationUserIds) => { const publishNotifications = async (context, promises) => { let notifications = await Promise.all(promises) notifications = notifications.flat() - const notificationsEmailAddresses = await queryNotificationsEmails( + const notificationsEmailAddresses = await queryNotificationEmails( context, notifications.map((notification) => notification.to.id), )