mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(n8n Node): fix resource locator not returning all items (#4248)
This commit is contained in:
committed by
GitHub
parent
971c2c0aed
commit
ed4dcbb5dd
@@ -1,5 +1,5 @@
|
||||
import { ILoadOptionsFunctions, INodeListSearchResult, INodeProperties } from 'n8n-workflow';
|
||||
import { apiRequest } from './GenericFunctions';
|
||||
import { apiRequestAllItems } from './GenericFunctions';
|
||||
|
||||
type DataItemsResponse<T> = {
|
||||
data: T[];
|
||||
@@ -18,7 +18,7 @@ export async function searchWorkflows(
|
||||
this: ILoadOptionsFunctions,
|
||||
query?: string,
|
||||
): Promise<INodeListSearchResult> {
|
||||
const searchResults = (await apiRequest.call(
|
||||
const searchResults = (await apiRequestAllItems.call(
|
||||
this,
|
||||
'GET',
|
||||
'workflows',
|
||||
@@ -27,7 +27,7 @@ export async function searchWorkflows(
|
||||
|
||||
// Map the workflows list against a simple name/id filter, and sort
|
||||
// with the latest on top.
|
||||
const workflows = (searchResults?.data as PartialWorkflow[])
|
||||
const workflows = (searchResults as unknown as PartialWorkflow[])
|
||||
.map((w: PartialWorkflow) => ({
|
||||
name: `${w.name} (#${w.id})`,
|
||||
value: w.id,
|
||||
|
||||
Reference in New Issue
Block a user