n8n-nodes-prestashop8 2.0.3 → 2.0.4
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.
|
@@ -338,6 +338,18 @@ class PrestaShop8 {
|
|
|
338
338
|
const items = this.getInputData();
|
|
339
339
|
const returnData = [];
|
|
340
340
|
const credentials = await this.getCredentials('prestaShop8Api');
|
|
341
|
+
// Normalize base URL: ensure it ends with /api and has no trailing slash
|
|
342
|
+
let baseUrl = credentials.baseUrl.trim();
|
|
343
|
+
// Remove trailing slash if present
|
|
344
|
+
if (baseUrl.endsWith('/')) {
|
|
345
|
+
baseUrl = baseUrl.slice(0, -1);
|
|
346
|
+
}
|
|
347
|
+
// Add /api if not present
|
|
348
|
+
if (!baseUrl.endsWith('/api')) {
|
|
349
|
+
baseUrl = baseUrl + '/api';
|
|
350
|
+
}
|
|
351
|
+
// Update credentials with normalized URL
|
|
352
|
+
credentials.baseUrl = baseUrl;
|
|
341
353
|
// Récupérer directement la ressource et l'opération
|
|
342
354
|
const resource = this.getNodeParameter('resource', 0);
|
|
343
355
|
const operation = this.getNodeParameter('operation', 0);
|
|
@@ -1549,6 +1549,14 @@ exports.RESOURCE_SCHEMAS = {
|
|
|
1549
1549
|
},
|
|
1550
1550
|
},
|
|
1551
1551
|
'orders': {
|
|
1552
|
+
'reference': {
|
|
1553
|
+
type: 'string',
|
|
1554
|
+
format: 'isReference',
|
|
1555
|
+
required: false,
|
|
1556
|
+
readOnly: false,
|
|
1557
|
+
multilang: false,
|
|
1558
|
+
maxSize: 9,
|
|
1559
|
+
},
|
|
1552
1560
|
'id_address_delivery': {
|
|
1553
1561
|
type: 'number',
|
|
1554
1562
|
format: 'isUnsignedId',
|
package/package.json
CHANGED