- Cataloghi
- Import ed Export Pagine - ObjectID sostituita con ObjectId
This commit is contained in:
@@ -4,7 +4,7 @@ const Schema = mongoose.Schema;
|
||||
|
||||
const shared_consts = require('../tools/shared_nodejs');
|
||||
|
||||
const { ObjectID } = require('mongodb');
|
||||
const { ObjectId } = require('mongodb');
|
||||
|
||||
mongoose.Promise = global.Promise;
|
||||
mongoose.level = "F";
|
||||
@@ -377,7 +377,7 @@ module.exports.updateTotals = function (order) {
|
||||
|
||||
module.exports.getTotalOrderById = async function (id) {
|
||||
const query = [
|
||||
{ $match: { _id: ObjectID(id) } },
|
||||
{ $match: { _id: ObjectId(id) } },
|
||||
{
|
||||
$lookup: {
|
||||
from: 'products',
|
||||
@@ -660,7 +660,7 @@ module.exports.GeneraCSVOrdineProdotti = async function () {
|
||||
const myidGasordine = '65c2a8cc379ee4f57e865ee7';
|
||||
|
||||
const myquery = [
|
||||
{ $match: { idGasordine: ObjectID(myidGasordine) } },
|
||||
{ $match: { idGasordine: ObjectId(myidGasordine) } },
|
||||
{
|
||||
$lookup: {
|
||||
from: 'products',
|
||||
|
||||
Reference in New Issue
Block a user