- Codice internazionale numero + Country

This commit is contained in:
paoloar77
2021-12-21 01:27:45 +01:00
parent 3f8a2abd66
commit d6e571edbf
13 changed files with 237 additions and 179 deletions

View File

@@ -17,7 +17,6 @@ const {NavePersistente} = require('../models/navepersistente');
const {ObjectID} = require('mongodb');
const shared_consts = require('../tools/shared_nodejs');
const queryclass = require('../classes/queryclass');
mongoose.Promise = global.Promise;
@@ -229,6 +228,18 @@ const UserSchema = new mongoose.Schema({
dateofbirth: {
type: Date,
},
born_city: {
type: String,
trim: true,
},
born_province: {
type: String,
trim: true,
},
born_country: {
type: String,
trim: true,
},
my_dream: {
type: String,
},
@@ -1504,32 +1515,6 @@ UserSchema.statics.getUsersList = function(idapp) {
);
};
UserSchema.statics.getUsersListByParams = function(params) {
const User = this;
myclParamQuery = new queryclass.CParamsQuery(params);
const filterMatchBefore = `${myclParamQuery.filter}`;
return User.find(
{$match: filterMatchBefore},
{'idapp': idapp},
{
username: 1,
name: 1,
surname: 1,
verified_email: 1,
made_gift: 1,
perm: 1,
email: 1,
date_reg: 1,
img: 1,
lasttimeonline: 1,
news_on: 1,
});
};
/**
* Query blog posts by user -> paginated results and a total count.
* @returns {Object} Object -> `{ rows, count }`