mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Switched from <=
to <
in members event pagination
refs https://github.com/TryGhost/Team/issues/1277 - using `<= created_at` requires client-side deduplication to prevent the same records appearing in the next page - using `< created_at` does result in a possibility of records being missed between pages with the API's current pagination behaviour if many events occur within the same second but for our current requirements (no email events shown unless filtering by specific member) that is edge-case enough that simplified client code is preferable
This commit is contained in:
parent
9c139a78e4
commit
9c06b5e71f
@ -31,7 +31,7 @@ export default class MembersEventsFetcher extends Resource {
|
||||
|
||||
async setup() {
|
||||
this.cursor = moment.utc().format('YYYY-MM-DD HH:mm:ss');
|
||||
let filter = `created_at:<='${this.cursor}'`;
|
||||
let filter = `created_at:<'${this.cursor}'`;
|
||||
|
||||
if (this.args.named.filter) {
|
||||
filter += `+${this.args.named.filter}`;
|
||||
@ -58,7 +58,7 @@ export default class MembersEventsFetcher extends Resource {
|
||||
}
|
||||
|
||||
this.cursor = cursor;
|
||||
let filter = `created_at:<='${this.cursor}'`;
|
||||
let filter = `created_at:<'${this.cursor}'`;
|
||||
|
||||
if (this.args.named.filter) {
|
||||
filter += `+${this.args.named.filter}`;
|
||||
|
Loading…
Reference in New Issue
Block a user