mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Renamed components of member-analytic-service
no-issue This removes the concept of "Module" which simplifies the code
This commit is contained in:
parent
216d27371a
commit
ed6d305fb2
@ -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;
|
||||
|
@ -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;
|
Loading…
Reference in New Issue
Block a user