@fachkraftfreund/n8n-nodes-supabase 1.2.11 → 1.2.12
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.
|
@@ -891,12 +891,6 @@ class Supabase {
|
|
|
891
891
|
async execute() {
|
|
892
892
|
const items = this.getInputData();
|
|
893
893
|
const returnData = [];
|
|
894
|
-
const firstItem = items[0];
|
|
895
|
-
if (items.length === 1 &&
|
|
896
|
-
(firstItem === null || firstItem === void 0 ? void 0 : firstItem.json) &&
|
|
897
|
-
Object.keys(firstItem.json).length === 0) {
|
|
898
|
-
return [[{ json: {} }]];
|
|
899
|
-
}
|
|
900
894
|
const credentials = await this.getCredentials('supabaseExtendedApi');
|
|
901
895
|
try {
|
|
902
896
|
(0, supabaseClient_1.validateCredentials)(credentials);
|
|
@@ -909,6 +903,12 @@ class Supabase {
|
|
|
909
903
|
const resource = this.getNodeParameter('resource', 0);
|
|
910
904
|
const operation = this.getNodeParameter('operation', 0);
|
|
911
905
|
if (resource === 'database' && ['create', 'upsert', 'update'].includes(operation)) {
|
|
906
|
+
const firstItem = items[0];
|
|
907
|
+
if (items.length === 1 &&
|
|
908
|
+
(firstItem === null || firstItem === void 0 ? void 0 : firstItem.json) &&
|
|
909
|
+
Object.keys(firstItem.json).length === 0) {
|
|
910
|
+
return [[{ json: {} }]];
|
|
911
|
+
}
|
|
912
912
|
try {
|
|
913
913
|
const results = await database_1.executeBulkDatabaseOperation.call(this, supabase, operation, items.length);
|
|
914
914
|
returnData.push(...results);
|
package/package.json
CHANGED