- aggiunto componenti per Home Template... ma ancora da provare
- sistemato catprods - Sistemato menu
This commit is contained in:
@@ -977,14 +977,6 @@ module.exports.getArrCatProds = async function (idapp, cosa) {
|
||||
|
||||
let myquery = [
|
||||
...addquery,
|
||||
{
|
||||
$lookup: {
|
||||
from: 'productinfos',
|
||||
localField: 'idProductInfo',
|
||||
foreignField: '_id',
|
||||
as: 'productInfo',
|
||||
},
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'catprods',
|
||||
@@ -1015,6 +1007,10 @@ module.exports.getArrCatProds = async function (idapp, cosa) {
|
||||
let arr = [];
|
||||
arr = await Product.aggregate(myquery);
|
||||
|
||||
if (cosa !== shared_consts.PROD.GAS) {
|
||||
// console.log(JSON.stringify(myquery, null, 2))
|
||||
}
|
||||
|
||||
// arr = result.map(category => category.name);
|
||||
return arr;
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user