Skip to content

Commit

Permalink
Added limit option to /members/events API
Browse files Browse the repository at this point in the history
refs TryGhost/Product#469

The initial implementation was just to get us going with the dashboard
but the requirements have changed now, rather than updating the code we
allow to pass the `limit` options so the Admin can choose how many
events to display.
  • Loading branch information
allouis committed Feb 23, 2021
1 parent 3373b5b commit b5e85c5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/server/api/canary/members.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,14 @@ module.exports = {
},

activityFeed: {
options: [
'limit'
],
permissions: {
method: 'browse'
},
async query() {
const events = await membersService.api.events.getEventTimeline();
async query(frame) {
const events = await membersService.api.events.getEventTimeline(frame.options);
return {
events
};
Expand Down

0 comments on commit b5e85c5

Please sign in to comment.