- Cataloghi
- Import ed Export Pagine - ObjectID sostituita con ObjectId
This commit is contained in:
@@ -16,7 +16,7 @@ const axios = require('axios');
|
||||
const CryptoJS = require('crypto-js');
|
||||
const Url = require('url-parse');
|
||||
|
||||
const { ObjectID, ObjectId } = require('mongodb');
|
||||
const { ObjectId } = require('mongodb');
|
||||
|
||||
const shared_consts = require('./shared_nodejs');
|
||||
|
||||
@@ -845,7 +845,7 @@ module.exports = {
|
||||
CloneRecordToNew(src) {
|
||||
const myrec = Object.assign({}, src);
|
||||
delete myrec._doc['_id'];
|
||||
myrec._id = new ObjectID();
|
||||
myrec._id = new ObjectId();
|
||||
|
||||
return myrec._doc;
|
||||
},
|
||||
@@ -2646,6 +2646,8 @@ module.exports = {
|
||||
filtriadded.push({ 'profile.teleg_id_old': { $gt: 1 } });
|
||||
if (params.filterand.includes(shared_consts.FILTER_USER_PROVINCE))
|
||||
filtriadded.push({ 'profile.resid_province': { $exists: true } });
|
||||
if (params.filterand.includes(shared_consts.FILTER_USER_SENZA_PROVINCE))
|
||||
filtriadded.push({ 'profile.resid_province': { $exists: false } });
|
||||
if (params.filterand.includes(shared_consts.FILTER_ATTIVI))
|
||||
filtriadded.push({
|
||||
$or: [
|
||||
@@ -2715,10 +2717,10 @@ module.exports = {
|
||||
let condition = {};
|
||||
for (const myfilter of params.filtercustom) {
|
||||
if (myfilter['userId']) {
|
||||
myfilter['userId'] = ObjectID(myfilter['userId']);
|
||||
myfilter['userId'] = ObjectId(myfilter['userId']);
|
||||
}
|
||||
if (myfilter['_idOBJ']) {
|
||||
filtriadded.push({ _id: ObjectID(myfilter['_idOBJ']) });
|
||||
filtriadded.push({ _id: ObjectId(myfilter['_idOBJ']) });
|
||||
} else if (myfilter['dateTimeStart']) {
|
||||
const gte = myfilter['dateTimeStart'].$gte;
|
||||
const lte = myfilter['dateTimeStart'].$lte;
|
||||
@@ -3398,7 +3400,7 @@ module.exports = {
|
||||
|
||||
for (let ind = 0; ind < arrrec.length; ind++) {
|
||||
let newrec = new mythistable(arrrec[ind]);
|
||||
newrec._id = new ObjectID();
|
||||
newrec._id = new ObjectId();
|
||||
newrec.idapp = idappdest;
|
||||
|
||||
try {
|
||||
|
||||
@@ -8,7 +8,7 @@ require('../config/config');
|
||||
|
||||
require('../models/subscribers');
|
||||
|
||||
const { ObjectID } = require('mongodb');
|
||||
const { ObjectId } = require('mongodb');
|
||||
|
||||
const { User } = require('../models/user');
|
||||
const { MyGroup } = require('../models/mygroup');
|
||||
|
||||
@@ -45,6 +45,7 @@ module.exports = {
|
||||
FILTER_USER_SI_TELEGRAM_ID: 4194304,
|
||||
FILTER_USER_WITHOUT_USERNAME_TELEGRAM: 8388608,
|
||||
FILTER_USER_PROVINCE: 16777216,
|
||||
FILTER_USER_SENZA_PROVINCE: 33554432,
|
||||
|
||||
OPTIONS_SEARCH_ONLY_FULL_WORDS: 1,
|
||||
OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2,
|
||||
@@ -245,7 +246,7 @@ module.exports = {
|
||||
],
|
||||
TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||
TABLES_CREATEDBY: ['mygroups', 'circuits', 'attivitas'],
|
||||
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'bots', 'mygroups', 'circuits', 'attivitas', 'myelems', 'mypages'],
|
||||
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'bots', 'mygroups', 'circuits', 'attivitas', 'myelems', 'mypages', 'productinfos', 'products'],
|
||||
|
||||
TABLES_FIELDS_DESCR_AND_CITY_AND_USER: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user