mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user