feat(editor): Add HTTP request nodes for credentials without a node (#7157)
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -66,6 +66,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { getSourceItems } from '@/utils';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { getCredentialTypeName, isCredentialOnlyNodeType } from '@/utils/credentialOnlyNodes';
|
||||
|
||||
export function getParentMainInputNode(workflow: Workflow, node: INode): INode {
|
||||
const nodeType = useNodeTypesStore().getNodeType(node.type);
|
||||
@@ -683,11 +684,18 @@ export const workflowHelpers = defineComponent({
|
||||
const nodeType = this.nodeTypesStore.getNodeType(node.type, node.typeVersion);
|
||||
|
||||
if (nodeType !== null) {
|
||||
const isCredentialOnly = isCredentialOnlyNodeType(nodeType.name);
|
||||
|
||||
if (isCredentialOnly) {
|
||||
nodeData.type = HTTP_REQUEST_NODE_TYPE;
|
||||
nodeData.extendsCredential = getCredentialTypeName(nodeType.name);
|
||||
}
|
||||
|
||||
// Node-Type is known so we can save the parameters correctly
|
||||
const nodeParameters = NodeHelpers.getNodeParameters(
|
||||
nodeType.properties,
|
||||
node.parameters,
|
||||
false,
|
||||
isCredentialOnly,
|
||||
false,
|
||||
node,
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import { mapStores } from 'pinia';
|
||||
import type { IExecutionPushResponse, IExecutionResponse, IStartRunData } from '@/Interface';
|
||||
import { mapStores } from 'pinia';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import type { IRunData, IRunExecutionData, ITaskData, IWorkflowBase } from 'n8n-workflow';
|
||||
import {
|
||||
@@ -10,15 +10,15 @@ import {
|
||||
FORM_TRIGGER_PATH_IDENTIFIER,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { useToast } from '@/composables';
|
||||
import { externalHooks } from '@/mixins/externalHooks';
|
||||
import { workflowHelpers } from '@/mixins/workflowHelpers';
|
||||
import { useToast } from '@/composables';
|
||||
|
||||
import { useTitleChange } from '@/composables/useTitleChange';
|
||||
import { useRootStore } from '@/stores/n8nRoot.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useRootStore } from '@/stores/n8nRoot.store';
|
||||
import { FORM_TRIGGER_NODE_TYPE } from '../constants';
|
||||
import { FORM_TRIGGER_NODE_TYPE } from '@/constants';
|
||||
import { openPopUpWindow } from '@/utils/executionUtils';
|
||||
|
||||
export const workflowRun = defineComponent({
|
||||
|
||||
Reference in New Issue
Block a user