- Cataloghi: BestSeller, Novità

This commit is contained in:
Surya Paolo
2024-11-28 16:05:00 +01:00
parent a42c365052
commit 351b81308a
12 changed files with 290 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
const os = require('os');
const fs = require('fs');
const xml2js = require('xml2js');
const path = require('path');
const WebSocket = require('ws');
@@ -5824,6 +5825,20 @@ module.exports = {
}
return myurl;
},
// Funzione per convertire XML in JSON
convertXMLToJSON(xml) {
const parser = new xml2js.Parser();
parser.parseString(xml, (err, result) => {
if (err) {
console.error('Error parsing XML:', err);
} else {
console.log(JSON.stringify(result, null, 2)); // Stampa il risultato in formato JSON
}
});
}
};

View File

@@ -322,6 +322,8 @@ module.exports = {
PRODUCTS_V2: 22,
INVENTARIO: 30,
MACRO_CATALOGO_JSON: 40,
MACRO_RANKING: 50,
MACRO_DESCRELINKSITOWEB: 60,
},
WalletFinalStatusType: {