- Modifiche a ProductInfo... Continua
This commit is contained in:
@@ -526,19 +526,6 @@ router.post('/:userId/gestord', authenticate, async function (req, res, next) {
|
||||
preserveNullAndEmptyArrays: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'productinfos',
|
||||
localField: 'product.idProductInfo',
|
||||
foreignField: '_id',
|
||||
as: 'productInfo',
|
||||
},
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: '$productInfo',
|
||||
},
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'gasordines',
|
||||
@@ -588,13 +575,13 @@ router.post('/:userId/gestord', authenticate, async function (req, res, next) {
|
||||
$group: {
|
||||
_id: '$product._id',
|
||||
name: {
|
||||
$first: '$productInfo.name',
|
||||
$first: '$product.productInfo.name',
|
||||
},
|
||||
weight: {
|
||||
$first: '$productInfo.weight',
|
||||
$first: '$product.productInfo.weight',
|
||||
},
|
||||
unit: {
|
||||
$first: '$productInfo.unit',
|
||||
$first: '$product.productInfo.unit',
|
||||
},
|
||||
price_acquistato: {
|
||||
$first: '$product.price_acquistato',
|
||||
|
||||
Reference in New Issue
Block a user