Fixed issue on save load auth node error
Some checks failed
Build / build (push) Has been cancelled

This commit is contained in:
Ankitkumar Satapara
2026-04-21 00:21:47 +05:30
parent 99b8e2c24d
commit ec122449d7
2 changed files with 29 additions and 0 deletions

View File

@@ -43,6 +43,12 @@ namespace Nodify.Calculator
nodeData.NthIndex = take.NthIndex;
nodeData.IsRandom = take.IsRandom;
break;
case AuthOperationViewModel auth:
nodeData.NodeType = "System";
nodeData.SystemOp = auth.SystemOperationType.ToString();
nodeData.AuthBaseUrl = auth.BaseUrl ?? string.Empty;
nodeData.AuthType = auth.AuthType ?? string.Empty;
break;
case FunctionOperationViewModel func:
nodeData.NodeType = "Function";
nodeData.FunctionName = func.FunctionName;
@@ -417,6 +423,25 @@ namespace Nodify.Calculator
op.Output.Add(DeserializeConnector(sc, false));
}
}
else if (sysVm.SystemOperationType == SystemOperations.AUTH)
{
if (op is AuthOperationViewModel authOp)
{
authOp.BaseUrl = nd.AuthBaseUrl ?? string.Empty;
if (!string.IsNullOrEmpty(nd.AuthType))
authOp.AuthType = nd.AuthType;
// Restore data input connectors (preserve the leading triangle flow connector).
var dataInputs = op.Input.Where(i => i.Shape != ConnectorShape.Triangle).ToList();
foreach (var d in dataInputs) op.Input.Remove(d);
foreach (var ic in nd.InputConnectors)
{
if (ic.Shape == "Triangle") continue;
op.Input.Add(DeserializeConnector(ic, true));
}
}
}
else if (sysVm.SystemOperationType == SystemOperations.KNOT)
{
// Restore knot connector shape/color/datatype from saved data

View File

@@ -30,6 +30,10 @@ namespace Nodify.Calculator.Models
public string SystemOp { get; set; } = string.Empty;
public string ClassName { get; set; } = string.Empty;
// Auth node properties
public string AuthBaseUrl { get; set; } = string.Empty;
public string AuthType { get; set; } = string.Empty;
// Take node properties
public int NthIndex { get; set; }
public bool IsRandom { get; set; }