diff --git a/ghost/member-analytics-service/index.js b/ghost/member-analytics-service/index.js index 89aaa6c117..9f3fc72075 100644 --- a/ghost/member-analytics-service/index.js +++ b/ghost/member-analytics-service/index.js @@ -1,19 +1,19 @@ const AnalyticEventRepository = require('./lib/AnalyticEventRepository'); -const AnalyticsService = require('./lib/AnalyticsService'); +const EventHandler = require('./lib/EventHandler'); -class MemberAnalyticsModule { +class MemberAnalyticsService { /** * @param {AnalyticEventRepository} analyticEventRepository */ constructor(analyticEventRepository) { - this.service = new AnalyticsService(analyticEventRepository); + this.eventHandler = new EventHandler(analyticEventRepository); } static create(AnalyticEventModel) { const analyticEventRepository = new AnalyticEventRepository(AnalyticEventModel); - return new MemberAnalyticsModule(analyticEventRepository); + return new MemberAnalyticsService(analyticEventRepository); } } -module.exports = MemberAnalyticsModule; +module.exports = MemberAnalyticsService; diff --git a/ghost/member-analytics-service/lib/AnalyticsService.js b/ghost/member-analytics-service/lib/EventHandler.js similarity index 94% rename from ghost/member-analytics-service/lib/AnalyticsService.js rename to ghost/member-analytics-service/lib/EventHandler.js index b0a5eedaad..8cf3aee7a4 100644 --- a/ghost/member-analytics-service/lib/AnalyticsService.js +++ b/ghost/member-analytics-service/lib/EventHandler.js @@ -3,7 +3,7 @@ const {MemberEntryViewEvent} = require('@tryghost/member-events'); const AnalyticEvent = require('./AnalyticEvent'); -class AnalyticsService { +class EventHandler { /** * @param {import('./AnalyticEventRepository')} repository */ @@ -31,4 +31,4 @@ class AnalyticsService { } } -module.exports = AnalyticsService; +module.exports = EventHandler;