Lista Città (prese dal server: pickup)
This commit is contained in:
@@ -300,3 +300,48 @@ Mer 29/12 ORE 18:19: [Inviato a Paolo Arena (paoloar77)]:
|
|||||||
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
Mer 29/12 ORE 18:19: [Inviato a Paolo Arena (paoloar77)]:
|
Mer 29/12 ORE 18:19: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 05/01 ORE 16:17: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo2 Arena2 (paoloar775)
|
||||||
|
Mer 05/01 ORE 16:23: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 05/01 ORE 16:56: 🔥 Si è appena Registrato "Paolo Arena (paoloar77)
|
||||||
|
Mer 05/01 ORE 16:58: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 05/01 ORE 17:02: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 05/01 ORE 17:21: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 05/01 ORE 17:23: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 05/01 ORE 17:27: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 05/01 ORE 19:08: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 05/01 ORE 19:09: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Sab 15/01 ORE 23:21: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolotest1 Paolotest1 (paolotest1)
|
||||||
|
Sab 15/01 ORE 23:31: L'utente Paolo Arena (paoloar77) ha detto di aver già visto lo Zoom di Benvenuto
|
||||||
|
Sab 15/01 ORE 23:31: L'utente Paolo Arena (paoloar77) è stato confermato per aver visto lo Zoom di Benvenuto
|
||||||
|
Sab 15/01 ORE 23:31: L'utente Paolo Arena (paoloar77) è stato annullata la sua richiesta per aver visto lo Zoom di Benvenuto! (Non ci risulta)
|
||||||
|
Sab 15/01 ORE 23:31: L'utente Paolo Arena (paoloar77) è stato confermato per aver visto lo Zoom di Benvenuto
|
||||||
|
Sab 15/01 ORE 23:41: L'utente Paolo Arena (paoloar77) ha detto di aver già visto lo Zoom di Benvenuto
|
||||||
|
Sab 15/01 ORE 23:42: L'utente Paolo Arena (paoloar77) ha detto di aver già visto lo Zoom di Benvenuto
|
||||||
|
Sab 15/01 ORE 23:42: L'utente Paolo Arena (paoloar77) ha detto di aver già visto lo Zoom di Benvenuto
|
||||||
|
Sab 15/01 ORE 23:42: L'utente Paolo Arena (paoloar77) ha detto di aver già visto lo Zoom di Benvenuto
|
||||||
|
Sab 15/01 ORE 23:44: L'utente Paolo Arena (paoloar77) ha detto di aver già visto lo Zoom di Benvenuto
|
||||||
|
Dom 16/01 ORE 00:06: ❓ Si vuole confermare di Conoscere "Paolo Arena ?
|
||||||
|
Dom 16/01 ORE 21:53: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paoloar775 Paoloar775 (paoloar775)
|
||||||
|
Dom 16/01 ORE 22:01: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Pao Are (paoloar775)
|
||||||
|
Dom 16/01 ORE 22:02: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Pao Paoloar775 (paoloar775)
|
||||||
|
Dom 16/01 ORE 22:04: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paoloar775 Paoloar775 (paoloar775)
|
||||||
|
Dom 16/01 ORE 22:09: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paoloar775 Paoloar775 (paoloar775)
|
||||||
|
Dom 16/01 ORE 22:11: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paoloar775 Paoloar775 (paoloar775)
|
||||||
|
Dom 16/01 ORE 22:14: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Pao Are (paoloar775)
|
||||||
8093
src/server/data/listacomuni.csv
Normal file
8093
src/server/data/listacomuni.csv
Normal file
File diff suppressed because it is too large
Load Diff
89016
src/server/data/liste.js
Normal file
89016
src/server/data/liste.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,18 @@
|
|||||||
const mongoose = require('mongoose').set('debug', false)
|
const mongoose = require('mongoose').set('debug', false);
|
||||||
const Schema = mongoose.Schema;
|
const Schema = mongoose.Schema;
|
||||||
|
|
||||||
|
const escapeStringRegexp = require('escape-string-regexp');
|
||||||
|
|
||||||
mongoose.Promise = global.Promise;
|
mongoose.Promise = global.Promise;
|
||||||
mongoose.level = "F";
|
mongoose.level = 'F';
|
||||||
|
|
||||||
const tools = require('../tools/general');
|
const tools = require('../tools/general');
|
||||||
|
|
||||||
const { ObjectID } = require('mongodb');
|
const {ObjectID} = require('mongodb');
|
||||||
|
|
||||||
// Resolving error Unknown modifier: $pushAll
|
// Resolving error Unknown modifier: $pushAll
|
||||||
mongoose.plugin(schema => {
|
mongoose.plugin(schema => {
|
||||||
schema.options.usePushEach = true
|
schema.options.usePushEach = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
const CitySchema = new Schema({
|
const CitySchema = new Schema({
|
||||||
@@ -21,7 +23,7 @@ const CitySchema = new Schema({
|
|||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
comune: {
|
comune: {
|
||||||
type: String
|
type: String,
|
||||||
},
|
},
|
||||||
prov: {
|
prov: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -39,7 +41,7 @@ const CitySchema = new Schema({
|
|||||||
maxlength: 6,
|
maxlength: 6,
|
||||||
},
|
},
|
||||||
abitanti: {
|
abitanti: {
|
||||||
type: Number,
|
type: String,
|
||||||
},
|
},
|
||||||
country: {
|
country: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -47,9 +49,9 @@ const CitySchema = new Schema({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
CitySchema.pre('save', async function (next) {
|
CitySchema.pre('save', async function(next) {
|
||||||
if (this.isNew) {
|
if (this.isNew) {
|
||||||
const myrec = await City.findOne().limit(1).sort({_id:-1});
|
const myrec = await City.findOne().limit(1).sort({_id: -1});
|
||||||
if (!!myrec) {
|
if (!!myrec) {
|
||||||
if (myrec._doc._id === 0)
|
if (myrec._doc._id === 0)
|
||||||
this._id = 1;
|
this._id = 1;
|
||||||
@@ -64,34 +66,32 @@ CitySchema.pre('save', async function (next) {
|
|||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
CitySchema.statics.findByCity = function(mycity) {
|
||||||
CitySchema.statics.findByCity = function (mycity) {
|
|
||||||
|
|
||||||
let myregexp = new RegExp(mycity.trim().replace(' ', '|'), 'ig');
|
let myregexp = new RegExp(mycity.trim().replace(' ', '|'), 'ig');
|
||||||
|
|
||||||
const query = [
|
const query = [
|
||||||
{ $match: {comune: { $regex: myregexp } } },
|
{$match: {comune: {$regex: myregexp}}},
|
||||||
{ $sort: { descr: 1 } }
|
{$sort: {descr: 1}},
|
||||||
];
|
];
|
||||||
|
|
||||||
return City
|
return City.aggregate(query).then((arrrec) => {
|
||||||
.aggregate(query)
|
return arrrec;
|
||||||
.then((arrrec) => {
|
});
|
||||||
return arrrec
|
|
||||||
})
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CitySchema.statics.getFieldsForSearch = function () {
|
CitySchema.statics.getFieldsForSearch = function() {
|
||||||
return [{ field: 'comune', type: tools.FieldType.string },
|
return [
|
||||||
{ field: 'prov', type: tools.FieldType.string },
|
{field: 'comune', type: tools.FieldType.string},
|
||||||
{ field: 'reg', type: tools.FieldType.string },
|
{field: 'prov', type: tools.FieldType.string},
|
||||||
{ field: 'pref', type: tools.FieldType.number },
|
{field: 'reg', type: tools.FieldType.string},
|
||||||
{ field: 'cap', type: tools.FieldType.number },
|
{field: 'pref', type: tools.FieldType.number},
|
||||||
]
|
{field: 'cap', type: tools.FieldType.number},
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
CitySchema.statics.executeQueryTable = function (idapp, params) {
|
CitySchema.statics.executeQueryTable = function(idapp, params) {
|
||||||
params.fieldsearch = this.getFieldsForSearch();
|
params.fieldsearch = this.getFieldsForSearch();
|
||||||
|
|
||||||
const strfind = params.search;
|
const strfind = params.search;
|
||||||
@@ -103,13 +103,25 @@ CitySchema.statics.executeQueryTable = function (idapp, params) {
|
|||||||
return tools.executeQueryTable(this, 0, params);
|
return tools.executeQueryTable(this, 0, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
CitySchema.statics.findAllIdApp = async function (idapp) {
|
CitySchema.statics.executeQueryPickup = async function(idapp, params) {
|
||||||
|
|
||||||
|
const strfind = params.search;
|
||||||
|
|
||||||
|
if (strfind === '') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
const ris = await City.find({ comune: { $regex : '^' + strfind, $options: 'i' } }, {comune: 1, prov: 1, reg: 1}).lean();
|
||||||
|
return ris;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
CitySchema.statics.findAllIdApp = async function(idapp) {
|
||||||
const myfind = {};
|
const myfind = {};
|
||||||
|
|
||||||
return City.find(myfind);
|
return City.find(myfind);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const City = mongoose.model('City', CitySchema);
|
const City = mongoose.model('City', CitySchema);
|
||||||
|
|
||||||
module.exports = { City };
|
module.exports = {City};
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ MySkillSchema.statics.executeQueryTable = function(idapp, params) {
|
|||||||
username: 1,
|
username: 1,
|
||||||
name: 1,
|
name: 1,
|
||||||
surname: 1,
|
surname: 1,
|
||||||
|
'profile.img': 1,
|
||||||
|
'profile.qualifica': 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const countryCodes = require('country-codes-list');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
async executeQueryTable(idapp, params) {
|
async executeQueryPickup(idapp, params) {
|
||||||
|
|
||||||
const table = params.table;
|
const table = params.table;
|
||||||
const strfind = params.search;
|
const strfind = params.search;
|
||||||
|
|||||||
@@ -282,6 +282,9 @@ const UserSchema = new mongoose.Schema({
|
|||||||
biografia: {
|
biografia: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
qualifica: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
motivazioni: {
|
motivazioni: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
@@ -1189,6 +1192,7 @@ UserSchema.statics.getUserProfileByUsername = async function(idapp, username) {
|
|||||||
verified_email: 1,
|
verified_email: 1,
|
||||||
verified_by_aportador: 1,
|
verified_by_aportador: 1,
|
||||||
'profile.nationality': 1,
|
'profile.nationality': 1,
|
||||||
|
'profile.qualifica': 1,
|
||||||
'profile.biografia': 1,
|
'profile.biografia': 1,
|
||||||
'profile.teleg_id': 1,
|
'profile.teleg_id': 1,
|
||||||
'profile.username_telegram': 1,
|
'profile.username_telegram': 1,
|
||||||
@@ -1283,7 +1287,7 @@ UserSchema.statics.setFriendsCmd = async function(
|
|||||||
idapp,
|
idapp,
|
||||||
username: usernameOrig,
|
username: usernameOrig,
|
||||||
'profile.friends': {
|
'profile.friends': {
|
||||||
$elemMatch: {$eq: {username: usernameDest}},
|
$elemMatch: {username: {$eq: usernameDest}},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1307,7 +1311,7 @@ UserSchema.statics.setFriendsCmd = async function(
|
|||||||
idapp,
|
idapp,
|
||||||
username: usernameDest,
|
username: usernameDest,
|
||||||
'profile.friends': {
|
'profile.friends': {
|
||||||
$elemMatch: {$eq: {username: usernameOrig}},
|
$elemMatch: {username: {$eq: usernameOrig}},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1333,7 +1337,7 @@ UserSchema.statics.setFriendsCmd = async function(
|
|||||||
idapp,
|
idapp,
|
||||||
username: usernameDest,
|
username: usernameDest,
|
||||||
'profile.req_friends': {
|
'profile.req_friends': {
|
||||||
$elemMatch: {$eq: {username: usernameOrig}},
|
$elemMatch: { username: {$eq: usernameOrig}},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1407,6 +1411,7 @@ function getWhatToShow(idapp, username) {
|
|||||||
verified_email: 1,
|
verified_email: 1,
|
||||||
verified_by_aportador: 1,
|
verified_by_aportador: 1,
|
||||||
'profile.nationality': 1,
|
'profile.nationality': 1,
|
||||||
|
'profile.qualifica': 1,
|
||||||
'profile.biografia': 1,
|
'profile.biografia': 1,
|
||||||
'profile.username_telegram': 1,
|
'profile.username_telegram': 1,
|
||||||
'profile.img': 1,
|
'profile.img': 1,
|
||||||
@@ -1471,7 +1476,7 @@ UserSchema.statics.getAskedFriendsByUsername = async function(idapp, username) {
|
|||||||
return User.find({
|
return User.find({
|
||||||
idapp,
|
idapp,
|
||||||
'profile.req_friends': {
|
'profile.req_friends': {
|
||||||
$elemMatch: {$eq: {username: username}},
|
$elemMatch: {username: {$eq: username}},
|
||||||
},
|
},
|
||||||
$or: [{deleted: {$exists: false}}, {deleted: {$exists: true, $eq: false}}],
|
$or: [{deleted: {$exists: false}}, {deleted: {$exists: true, $eq: false}}],
|
||||||
}, whatToShow_Unknown).then((rec) => {
|
}, whatToShow_Unknown).then((rec) => {
|
||||||
@@ -1510,7 +1515,7 @@ UserSchema.statics.getFriendsByUsername = async function(idapp, username) {
|
|||||||
let listSentRequestFriends = await User.find({
|
let listSentRequestFriends = await User.find({
|
||||||
idapp,
|
idapp,
|
||||||
'profile.req_friends': {
|
'profile.req_friends': {
|
||||||
$elemMatch: {$eq: {username: username}},
|
$elemMatch: {username: {$eq: username}},
|
||||||
},
|
},
|
||||||
$or: [
|
$or: [
|
||||||
{deleted: {$exists: false}},
|
{deleted: {$exists: false}},
|
||||||
@@ -3134,6 +3139,27 @@ UserSchema.statics.DbOp = async function(idapp, mydata) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UserSchema.statics.addExtraInfo = async function(idapp, recUser) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
const listSentMyRequestFriends = await User.find({
|
||||||
|
idapp,
|
||||||
|
'profile.req_friends': {
|
||||||
|
$elemMatch: {username: {$eq: recUser.username}},
|
||||||
|
},
|
||||||
|
$or: [
|
||||||
|
{deleted: {$exists: false}},
|
||||||
|
{deleted: {$exists: true, $eq: false}}],
|
||||||
|
}, {username: 1});
|
||||||
|
|
||||||
|
recUser._doc.profile.asked_friends = listSentMyRequestFriends ? listSentMyRequestFriends : [];
|
||||||
|
}catch (e){
|
||||||
|
console.error('Err', e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return recUser;
|
||||||
|
};
|
||||||
|
|
||||||
UserSchema.statics.createNewSubRecord = async function(idapp, req) {
|
UserSchema.statics.createNewSubRecord = async function(idapp, req) {
|
||||||
const User = this;
|
const User = this;
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,57 @@
|
|||||||
const express = require('express');
|
const express = require('express');
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
const mongoose = require('mongoose').set('debug', false)
|
const mongoose = require('mongoose').set('debug', false);
|
||||||
const cfgserver = mongoose.model('cfgserver');
|
const cfgserver = mongoose.model('cfgserver');
|
||||||
|
|
||||||
|
const shared_consts = require('../tools/shared_nodejs');
|
||||||
|
|
||||||
const tools = require('../tools/general');
|
const tools = require('../tools/general');
|
||||||
|
|
||||||
var { authenticate } = require('../middleware/authenticate');
|
const {City} = require('../models/city');
|
||||||
|
|
||||||
|
var {authenticate} = require('../middleware/authenticate');
|
||||||
|
|
||||||
router.post('/updateval', authenticate, async (req, res) => {
|
router.post('/updateval', authenticate, async (req, res) => {
|
||||||
console.log('/updateval', req.body.pairval);
|
console.log('/updateval', req.body.pairval);
|
||||||
idapp = req.body.idapp;
|
idapp = req.body.idapp;
|
||||||
pair = req.body.pairval;
|
pair = req.body.pairval;
|
||||||
|
|
||||||
return await cfgserver.findOneAndUpdate({ chiave: pair.chiave, idapp, userId: pair.userId }, { $set: pair }, { new: false })
|
return await cfgserver.findOneAndUpdate(
|
||||||
.then((item) => {
|
{chiave: pair.chiave, idapp, userId: pair.userId}, {$set: pair},
|
||||||
// cfgserver.find({ chiave: pair.chiave }, (err, item) => {
|
{new: false}).then((item) => {
|
||||||
if (!!item) {
|
// cfgserver.find({ chiave: pair.chiave }, (err, item) => {
|
||||||
res.status(200).send();
|
if (!!item) {
|
||||||
} else {
|
res.status(200).send();
|
||||||
res.status(400).send();
|
} else {
|
||||||
}
|
res.status(400).send();
|
||||||
}).catch(err => {
|
}
|
||||||
|
}).catch(err => {
|
||||||
console.log('ERR:', err);
|
console.log('ERR:', err);
|
||||||
res.status(400).send();
|
res.status(400).send();
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
router.post('/import', authenticate, async (req, res) => {
|
||||||
|
const cmd = req.body.cmd;
|
||||||
|
const data = [];
|
||||||
|
|
||||||
|
try {
|
||||||
|
const liste = require('../data/liste');
|
||||||
|
|
||||||
|
if (cmd === shared_consts.Cmd.CITIES_SERVER) {
|
||||||
|
return City.insertMany(liste.Comuni).then((ris) => {
|
||||||
|
return res.status(200).send(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}catch (e) {
|
||||||
|
console.error('e', e);
|
||||||
|
res.status(400).send();
|
||||||
|
}
|
||||||
|
|
||||||
|
res.status(400).send();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|||||||
@@ -466,12 +466,12 @@ router.post('/pickup', authenticate, (req, res) => {
|
|||||||
const params = req.body;
|
const params = req.body;
|
||||||
let mytable = getTableByTableName(params.table);
|
let mytable = getTableByTableName(params.table);
|
||||||
// console.log('mytable', mytable);
|
// console.log('mytable', mytable);
|
||||||
if (!mytable || !shared_consts.TablePickup.includes(params.table)) {
|
if (!mytable) {
|
||||||
console.log(`Table ${params.table} not found`);
|
console.log(`Table ${params.table} not found`);
|
||||||
return res.status(400).send({});
|
return res.status(400).send({});
|
||||||
}
|
}
|
||||||
|
|
||||||
return mytable.executeQueryTable(req.user.idapp, params).then(ris => {
|
return mytable.executeQueryPickup(req.user.idapp, params).then(ris => {
|
||||||
return res.send(ris);
|
return res.send(ris);
|
||||||
|
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
@@ -1335,8 +1335,10 @@ function load(req, res, version) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let askedfriends = []
|
let askedfriends = []
|
||||||
|
let myuserextra = null;
|
||||||
if (req.user) {
|
if (req.user) {
|
||||||
// askedfriends = User.getAskedFriendsByUsername(idapp, req.user.username);
|
// askedfriends = User.getAskedFriendsByUsername(idapp, req.user.username);
|
||||||
|
myuserextra = User.addExtraInfo(idapp, req.user);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
@@ -1369,14 +1371,17 @@ function load(req, res, version) {
|
|||||||
subSkills,
|
subSkills,
|
||||||
sectors,
|
sectors,
|
||||||
statusSkills,
|
statusSkills,
|
||||||
cities]).then((arrdata) => {
|
cities,
|
||||||
|
myuserextra]).then((arrdata) => {
|
||||||
// console.table(arrdata);
|
// console.table(arrdata);
|
||||||
const myuser = req.user;
|
let myuser = req.user;
|
||||||
if (myuser) {
|
if (myuser) {
|
||||||
try {
|
try {
|
||||||
myuser.password = '';
|
myuser = arrdata[30];
|
||||||
myuser._doc.calcstat = arrdata[13];
|
if (myuser) {
|
||||||
// myuser._doc.profile.asked_friends = arrdata[30];
|
myuser.password = '';
|
||||||
|
myuser._doc.calcstat = arrdata[13];
|
||||||
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
if (version < 91) {
|
if (version < 91) {
|
||||||
|
|||||||
@@ -1349,6 +1349,9 @@ module.exports = {
|
|||||||
const q4 = this.getLookup(params.lookup4, 4, proj);
|
const q4 = this.getLookup(params.lookup4, 4, proj);
|
||||||
if (q4) query = [...query, ...q4];
|
if (q4) query = [...query, ...q4];
|
||||||
|
|
||||||
|
const q5 = this.getLookup(params.lookup5, 5, proj);
|
||||||
|
if (q5) query = [...query, ...q5];
|
||||||
|
|
||||||
if (params.filtersearch2) {
|
if (params.filtersearch2) {
|
||||||
if (params.filtersearch2.length > 0) {
|
if (params.filtersearch2.length > 0) {
|
||||||
query.push({$match: {$and: params.filtersearch2}});
|
query.push({$match: {$and: params.filtersearch2}});
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ module.exports = {
|
|||||||
SITES_KEY_TO_CRYPTED: ['email_pwd'],
|
SITES_KEY_TO_CRYPTED: ['email_pwd'],
|
||||||
|
|
||||||
TablePickup: ['countries', 'phones'],
|
TablePickup: ['countries', 'phones'],
|
||||||
TableCities: ['citta', 'province'],
|
TableCities: ['cities', 'province'],
|
||||||
|
|
||||||
PaymentTypes: [
|
PaymentTypes: [
|
||||||
'Nessuno',
|
'Nessuno',
|
||||||
@@ -89,6 +89,12 @@ module.exports = {
|
|||||||
Outcoming: 2,
|
Outcoming: 2,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Cmd: {
|
||||||
|
PROVINCE: 1,
|
||||||
|
COMUNI: 2,
|
||||||
|
CITIES_SERVER: 3,
|
||||||
|
},
|
||||||
|
|
||||||
WalletFinalStatusType: {
|
WalletFinalStatusType: {
|
||||||
None: 0,
|
None: 0,
|
||||||
InCommonCash: 1,
|
InCommonCash: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user