0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/services/api-version-compatibility/index.js

25 lines
736 B
JavaScript
Raw Normal View History

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;