Skip to content

Commit

Permalink
fix(Facebook Lead Ads Trigger Node): Pagination fix in RLC (#10956)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency authored Sep 25, 2024
1 parent d7c1d24 commit 6322372
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function pageList(
value: page.id,
url: `https://facebook.com/${page.id}`,
})),
paginationToken: paging?.cursors?.after,
paginationToken: paging?.next ? paging?.cursors?.after : undefined,
};
}

Expand All @@ -37,6 +37,6 @@ export async function formList(
name: form.name,
value: form.id,
})),
paginationToken: paging?.cursors?.after,
paginationToken: paging?.next ? paging?.cursors?.after : undefined,
};
}
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/FacebookLeadAds/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { GenericValue } from 'n8n-workflow';

export type BaseFacebookResponse<TData> = { data: TData };
export type BasePaginatedFacebookResponse<TData> = BaseFacebookResponse<TData> & {
paging: { cursors: { before?: string; after?: string } };
paging: { cursors: { before?: string; after?: string }; next?: string };
};

export type FacebookAppWebhookSubscriptionsResponse = BaseFacebookResponse<
Expand Down

0 comments on commit 6322372

Please sign in to comment.