ver 0.5.73:

- corretto invia monete da Conto Collettivo a Utente
- Aggiunto Provincia (tutorial).. in corso...
This commit is contained in:
Surya Paolo
2023-03-04 10:20:43 +01:00
parent 4effda98ec
commit 39cc9b66d6
4 changed files with 10 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ ProvinceSchema.statics.executeQueryPickup = async function(idapp, params) {
ProvinceSchema.statics.findAllIdApp = async function(idapp) {
const myfind = {};
return Province.find(myfind).sort({reg: 1, prov: 1});
return Province.find(myfind).sort({prov: 1});
};
const Province = mongoose.model('Province', ProvinceSchema);

View File

@@ -426,6 +426,13 @@ const UserSchema = new mongoose.Schema({
{
type: Number,
}],
resid_prov_id: {
type: Number,
},
resid_province: {
type: String,
trim: true,
},
},
});

View File

@@ -121,5 +121,6 @@ module.exports = {
{_id: 126, idSector: [1], descr: 'Terreno'},
{_id: 127, idSector: [1], descr: 'Stanza in affitto'},
{_id: 128, idSector: [1], descr: 'Stanza in condivisione'},
{_id: 129, idSector: [3], descr: 'Home Restaurant'},
],
};

View File

@@ -153,7 +153,7 @@ router.post('/', async (req, res) => {
if (lastrec.ipaddr === user.ipaddr) {
// Se l'ha fatto troppo ravvicinato
if (lastrec.date_reg) {
let ris = tools.isdiffSecDateLess(lastrec.date_reg, 120);
let ris = tools.isdiffSecDateLess(lastrec.date_reg, 5);
if (ris) {
tools.writeIPToBan(
user.ipaddr + ': [' + user.username + '] ' + user.name + ' ' +