n8n-nodes-pilot-status 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -101,7 +101,7 @@ class PilotStatus {
|
|
|
101
101
|
send: {
|
|
102
102
|
preSend: [
|
|
103
103
|
async function (requestOptions) {
|
|
104
|
-
var _a;
|
|
104
|
+
var _a, _b;
|
|
105
105
|
const mode = this.getNodeParameter('variablesMode');
|
|
106
106
|
let variables = {};
|
|
107
107
|
if (mode === 'json') {
|
|
@@ -109,7 +109,10 @@ class PilotStatus {
|
|
|
109
109
|
try {
|
|
110
110
|
const parsed = typeof raw === 'string' ? JSON.parse(raw) : raw;
|
|
111
111
|
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
112
|
-
|
|
112
|
+
// ✅ API exige que todos os valores sejam strings
|
|
113
|
+
for (const [k, v] of Object.entries(parsed)) {
|
|
114
|
+
variables[k] = String(v !== null && v !== void 0 ? v : '');
|
|
115
|
+
}
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
118
|
catch {
|
|
@@ -119,7 +122,8 @@ class PilotStatus {
|
|
|
119
122
|
else {
|
|
120
123
|
const ui = this.getNodeParameter('variablesUi');
|
|
121
124
|
for (const entry of (_a = ui === null || ui === void 0 ? void 0 : ui.values) !== null && _a !== void 0 ? _a : []) {
|
|
122
|
-
|
|
125
|
+
// ✅ API exige que todos os valores sejam strings
|
|
126
|
+
variables[entry.name] = String((_b = entry.value) !== null && _b !== void 0 ? _b : '');
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
129
|
// Garante que o body é um objeto e injeta "variables" como objeto
|