- ottimizzato il caricamento del sito

- ottimizzato il caricamento del catalogo.
This commit is contained in:
Surya Paolo
2025-05-15 18:22:43 +02:00
parent 768d299881
commit 3521a88395
9 changed files with 190 additions and 90 deletions

View File

@@ -136,7 +136,7 @@ CatProdSchema.statics.getCatProdWithTitleCount = async function (idapp, updateda
icon: 1,
color: 1,
quanti: { $size: '$myproducts' }, // Conta il numero di prodotti per ciascun CatProd
products: {
/*products: {
$map: {
input: "$myproducts",
as: "prod",
@@ -144,7 +144,7 @@ CatProdSchema.statics.getCatProdWithTitleCount = async function (idapp, updateda
name: "$$prod.name"
}
}
}
}*/
}
},
{ $sort: { name: 1 } } // Ordina i risultati per nome