mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
d94859f2e5
refs https://github.com/TryGhost/Team/issues/1505 refs https://github.com/TryGhost/Team/issues/1466 Exposes an API for historical counts broken down by tier and cadence. Counts backwards from the current stats like MRR to minimize inaccruate data due to missing/superfluous events.
32 lines
751 B
JavaScript
32 lines
751 B
JavaScript
const statsService = require('../../services/stats');
|
|
|
|
module.exports = {
|
|
docName: 'stats',
|
|
memberCountHistory: {
|
|
permissions: {
|
|
docName: 'members',
|
|
method: 'browse'
|
|
},
|
|
async query() {
|
|
return await statsService.getMemberCountHistory();
|
|
}
|
|
},
|
|
mrr: {
|
|
permissions: {
|
|
docName: 'members',
|
|
method: 'browse'
|
|
},
|
|
async query() {
|
|
return await statsService.getMRRHistory();
|
|
}
|
|
},
|
|
subscriptions: {
|
|
permissions: {
|
|
docName: 'members',
|
|
method: 'browse'
|
|
},
|
|
async query() {
|
|
return await statsService.getSubscriptionCountHistory();
|
|
}
|
|
}
|
|
};
|