mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 18:52:14 +03:00
Added initial member events timeline API (#12661)
refs https://github.com/TryGhost/Ghost/issues/12633 Allows us to show a list of recent member events for the site dashboard
This commit is contained in:
parent
9c0ecd7214
commit
7abc6ac705
@ -475,5 +475,17 @@ module.exports = {
|
||||
});
|
||||
return volumeStats;
|
||||
}
|
||||
},
|
||||
|
||||
activityFeed: {
|
||||
permissions: {
|
||||
method: 'browse'
|
||||
},
|
||||
async query() {
|
||||
const events = await membersService.api.events.getEventTimeline();
|
||||
return {
|
||||
events
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -18,7 +18,8 @@ module.exports = {
|
||||
memberStats: createSerializer('memberStats', passthrough),
|
||||
mrrStats: createSerializer('mrrStats', passthrough),
|
||||
subscriberStats: createSerializer('subscriberStats', passthrough),
|
||||
grossVolumeStats: createSerializer('grossVolumeStats', passthrough)
|
||||
grossVolumeStats: createSerializer('grossVolumeStats', passthrough),
|
||||
activityFeed: createSerializer('activityFeed', passthrough)
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -97,6 +97,8 @@ module.exports = function apiRoutes() {
|
||||
router.get('/members/stats/gross_volume', mw.authAdminApi, http(apiCanary.members.grossVolumeStats));
|
||||
router.get('/members/stats', mw.authAdminApi, http(apiCanary.members.stats));
|
||||
|
||||
router.get('/members/events', mw.authAdminApi, http(apiCanary.members.activityFeed));
|
||||
|
||||
router.get('/members/upload', mw.authAdminApi, http(apiCanary.members.exportCSV));
|
||||
router.post('/members/upload',
|
||||
mw.authAdminApi,
|
||||
|
Loading…
Reference in New Issue
Block a user