- aggiornamento 1.2.71
This commit is contained in:
@@ -143,6 +143,7 @@ async function filterValidItems(mycart) {
|
||||
try {
|
||||
mycart.newitems = [];
|
||||
let haschanged = false;
|
||||
|
||||
for (let item of mycart.items) {
|
||||
try {
|
||||
if (
|
||||
|
||||
@@ -329,7 +329,7 @@ module.exports.updateTotals = async function (order, codice_sconto) {
|
||||
|
||||
module.exports.getTotalOrderById = async function (id) {
|
||||
const query = [
|
||||
{ $match: { _id: new mongoose.Types.ObjectId(id) } },
|
||||
{ $match: { _id: new ObjectId(id) } },
|
||||
{
|
||||
$lookup: {
|
||||
from: 'products',
|
||||
@@ -543,6 +543,8 @@ module.exports.getTotalOrderById = async function (id) {
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
|
||||
const ris = await Order.aggregate(query);
|
||||
return ris;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user