From 7fafa1e152708a8b672bb6b19d9dacf5680aa2d3 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Wed, 24 Oct 2018 13:40:06 +0700 Subject: [PATCH] Fixed mail api usage of the notifcations api closes #10047 Requiring in the api module correctly wraps the notification api and exposes it as a function. --- core/server/api/v2/mail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/api/v2/mail.js b/core/server/api/v2/mail.js index 3e8fc8158d..83334e79aa 100644 --- a/core/server/api/v2/mail.js +++ b/core/server/api/v2/mail.js @@ -1,7 +1,7 @@ const Promise = require('bluebird'); const common = require('../../lib/common'); const mailService = require('../../services/mail'); -const notificationsAPI = require('./notifications'); +const api = require('./'); let mailer; let _private = {}; @@ -12,7 +12,7 @@ _private.sendMail = (object) => { return mailer.send(object.mail[0].message).catch((err) => { if (mailer.state.usingDirect) { - notificationsAPI.add( + api.notifications.add( { notifications: [{ type: 'warn',