mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
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.
This commit is contained in:
parent
1c21153b85
commit
7fafa1e152
1 changed files with 2 additions and 2 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue