mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 21:03:29 +03:00
ed6d305fb2
no-issue This removes the concept of "Module" which simplifies the code
20 lines
607 B
JavaScript
20 lines
607 B
JavaScript
const AnalyticEventRepository = require('./lib/AnalyticEventRepository');
|
|
const EventHandler = require('./lib/EventHandler');
|
|
|
|
class MemberAnalyticsService {
|
|
/**
|
|
* @param {AnalyticEventRepository} analyticEventRepository
|
|
*/
|
|
constructor(analyticEventRepository) {
|
|
this.eventHandler = new EventHandler(analyticEventRepository);
|
|
}
|
|
|
|
static create(AnalyticEventModel) {
|
|
const analyticEventRepository = new AnalyticEventRepository(AnalyticEventModel);
|
|
|
|
return new MemberAnalyticsService(analyticEventRepository);
|
|
}
|
|
}
|
|
|
|
module.exports = MemberAnalyticsService;
|