aggiornamento cataloghi, search
This commit is contained in:
@@ -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 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user