- Corretta query di estrapolazione libri su GM (Marco)

- aggiornato bestseller su fatlast1Y
- non mostrare piu i libri che non hanno l'immagine (sul catalogo).
- metti online i compressi
This commit is contained in:
Surya Paolo
2025-06-16 19:36:57 +02:00
parent 5668c620da
commit 8c0619992b
9 changed files with 117 additions and 58 deletions

View File

@@ -250,13 +250,14 @@ CatalogSchema.statics.getCatalogById = async function (id) {
product.idProductInfo.code &&
product.idProductInfo.code !== '' &&
product.idProductInfo.imagefile &&
//product.idProductInfo.imagefile !== 'noimg.jpg' &&
product.idProductInfo.imagefile !== 'noimg.jpg' &&
!product.delete
);
if (catalog.lista_prodotti.length !== originalLength) {
await catalog.save();
}
}
const transformedArrRec = arrrec.map((catalog) => ({
...catalog.toObject(), // Converte il documento Mongoose in un oggetto JavaScript puro