fix(Facebook Lead Ads Trigger Node): Pagination fix in RLC (#10956)

This commit is contained in:
Michael Kret
2024-09-25 19:04:52 +03:00
committed by GitHub
parent d7c1d24f74
commit 6322372610
2 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ export async function pageList(
value: page.id, value: page.id,
url: `https://facebook.com/${page.id}`, url: `https://facebook.com/${page.id}`,
})), })),
paginationToken: paging?.cursors?.after, paginationToken: paging?.next ? paging?.cursors?.after : undefined,
}; };
} }
@@ -37,6 +37,6 @@ export async function formList(
name: form.name, name: form.name,
value: form.id, value: form.id,
})), })),
paginationToken: paging?.cursors?.after, paginationToken: paging?.next ? paging?.cursors?.after : undefined,
}; };
} }

View File

@@ -2,7 +2,7 @@ import type { GenericValue } from 'n8n-workflow';
export type BaseFacebookResponse<TData> = { data: TData }; export type BaseFacebookResponse<TData> = { data: TData };
export type BasePaginatedFacebookResponse<TData> = BaseFacebookResponse<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< export type FacebookAppWebhookSubscriptionsResponse = BaseFacebookResponse<