mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
25 lines
736 B
JavaScript
25 lines
736 B
JavaScript
|
const APIVersionCompatibilityService = require('@tryghost/api-version-compatibility-service');
|
||
|
const {GhostMailer} = require('../mail');
|
||
|
|
||
|
const {
|
||
|
getNotificationEmails,
|
||
|
fetchNotification,
|
||
|
saveNotification
|
||
|
} = require('./version-notifications-data-service');
|
||
|
|
||
|
const ghostMailer = new GhostMailer();
|
||
|
|
||
|
const init = () => {
|
||
|
this.APIVersionCompatibilityServiceInstance = new APIVersionCompatibilityService({
|
||
|
sendEmail: (options) => {
|
||
|
return ghostMailer.send(options);
|
||
|
},
|
||
|
fetchEmailsToNotify: getNotificationEmails,
|
||
|
fetchHandled: fetchNotification,
|
||
|
saveHandled: saveNotification
|
||
|
});
|
||
|
};
|
||
|
|
||
|
module.exports.APIVersionCompatibilityServiceInstance;
|
||
|
module.exports.init = init;
|