mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
handle params better
This commit is contained in:
parent
6709fd3dde
commit
97109b0069
|
@ -206,11 +206,13 @@ const fetchWorkflowsWithFilters = async () => {
|
||||||
|
|
||||||
const projectId =
|
const projectId =
|
||||||
typeof route.params?.projectId === 'string' ? route.params.projectId : homeProject;
|
typeof route.params?.projectId === 'string' ? route.params.projectId : homeProject;
|
||||||
|
const tagNames = tags.map((tagId) => tagsStore.tagsById[tagId]?.name);
|
||||||
|
// todo move to fetchAllWorkflows function
|
||||||
const options: WorkflowsFetchOptions = {
|
const options: WorkflowsFetchOptions = {
|
||||||
filter: {
|
filter: {
|
||||||
projectId,
|
projectId: projectId?.length ? projectId : undefined,
|
||||||
active: status === StatusFilter.ACTIVE ? true : undefined,
|
active: status === StatusFilter.ACTIVE ? true : undefined,
|
||||||
tags: tags.map((tagId) => tagsStore.tagsById[tagId]?.name),
|
tags: tagNames.length ? tagNames : undefined,
|
||||||
},
|
},
|
||||||
credentialIds: credentials.length ? credentials : undefined,
|
credentialIds: credentials.length ? credentials : undefined,
|
||||||
nodeTypes: nodeTypes.length ? nodeTypes : undefined,
|
nodeTypes: nodeTypes.length ? nodeTypes : undefined,
|
||||||
|
|
Loading…
Reference in a new issue