aggiornamento cataloghi, search

This commit is contained in:
Surya Paolo
2025-04-22 18:30:48 +02:00
parent ad45ce60ee
commit 58431c144c
9 changed files with 194 additions and 42 deletions

View File

@@ -163,6 +163,7 @@ exports.getTableContentBase = async (options) => {
if (options.aggregation) {
records = await mymodel.aggregate(options.aggregation);
} else {
const pipeline = [];
@@ -462,8 +463,8 @@ exports.getTableContentBase = async (options) => {
return output;
} catch (error) {
output = error.message;
console.error("Errore nel recupero della tabella: ", error.message);
output = `${error.response.data.error || error.stack || error.message}`;
console.error("Errore nel recupero della tabella: ", `${error.response.data.error || error.stack || error.message}`);
if (options.outhtml) {
output = `
@@ -905,6 +906,7 @@ exports.updateAllBook = async (idapp, options) => {
try {
const macro = new Macro(idapp); // Crea un'istanza della classe Macro
options.idapp = idapp;
return await macro.updateLocalDbFromGM_T_Web_Articoli(options);
@@ -919,7 +921,7 @@ exports.updateAllBookRoute = async (req, res) => {
try {
const idapp = req.body.idapp;
const options = req.body.options;
const result = this.updateAllBook(idapp, options);
const result = await this.updateAllBook(idapp, options);
return res.status(200).send({ data: result });