- ver 1.1.15
This commit is contained in:
@@ -14,7 +14,7 @@ if causale
|
|||||||
p Commento di #{mittente}: #{causale}
|
p Commento di #{mittente}: #{causale}
|
||||||
p <br>
|
p <br>
|
||||||
p Apri
|
p Apri
|
||||||
strong <a href=#{strlinksito} target="_blank">#{nomeapp}</a>
|
strong <a href=#{strlinksito} target="_blank">#{nomeapp}</a>
|
||||||
span per vedere il tuo nuovo saldo.
|
span per vedere il tuo nuovo saldo.
|
||||||
p <br>
|
p <br>
|
||||||
p Cordiali Saluti
|
p Cordiali Saluti
|
||||||
|
|||||||
@@ -413,4 +413,9 @@ Dom 03/11 ORE 19:32: [<b>Circuito RIS Italia</b>]: Inviate Monete da paoloar77 a
|
|||||||
|
|
||||||
Saldi:
|
Saldi:
|
||||||
paoloar77: 81.00 RIS]
|
paoloar77: 81.00 RIS]
|
||||||
ElenaEspx: -48.10 RIS]
|
ElenaEspx: -48.10 RIS]
|
||||||
|
Gio 09/01 ORE 17:04: [<b>Circuito RIS TerraNFT</b>]: Inviate Monete da terranft (paoloar77) a SuryaArena 30 RIS [causale: Iniziale]
|
||||||
|
|
||||||
|
Saldi:
|
||||||
|
terranft (paoloar77): -30.00 RIS]
|
||||||
|
SuryaArena: 30.00 RIS]
|
||||||
@@ -127,6 +127,12 @@ const CircuitSchema = new Schema({
|
|||||||
qta_max_default_grp: {
|
qta_max_default_grp: {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
|
fido_scoperto_default_contocom: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
|
qta_max_default_contocom: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
data_costituz: {
|
data_costituz: {
|
||||||
type: Date,
|
type: Date,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2219,7 +2219,7 @@ UserSchema.statics.removeFromCircuits = async function (idapp, username, circuit
|
|||||||
if (myaccount && myaccount.totTransato === 0) {
|
if (myaccount && myaccount.totTransato === 0) {
|
||||||
remove = true;
|
remove = true;
|
||||||
} else {
|
} else {
|
||||||
remove = true;
|
remove = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (remove) {
|
if (remove) {
|
||||||
@@ -3045,33 +3045,8 @@ UserSchema.statics.setCircuitCmd = async function (idapp, usernameOrig, circuitn
|
|||||||
outres.result = await Circuit.getInfoCircuitByName(idapp, circuitname);
|
outres.result = await Circuit.getInfoCircuitByName(idapp, circuitname);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const foundIfAlreadyCircuit = await this.ifAlreadyInCircuit(idapp, usernameOrig, circuitname);
|
|
||||||
|
|
||||||
if (!foundIfAlreadyCircuit) {
|
ris = await this.addCircuitToUser(idapp, usernameOrig, circuitname, true, '');
|
||||||
update = {
|
|
||||||
$push: {
|
|
||||||
'profile.mycircuits': {
|
|
||||||
circuitname,
|
|
||||||
date: new Date(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
ris = await User.updateOne({ idapp, username: usernameOrig }, update);
|
|
||||||
|
|
||||||
// Elimina la richiesta:
|
|
||||||
update = { $pull: { req_users: { username: { $in: [usernameOrig] } } } };
|
|
||||||
await Circuit.updateOne({ idapp, name: circuitname }, update);
|
|
||||||
|
|
||||||
// Elimina eventualmente se era bloccato:
|
|
||||||
update = { $pull: { refused_users: { username: { $in: [usernameOrig] } } } };
|
|
||||||
await Circuit.updateOne({ idapp, name: circuitname }, update);
|
|
||||||
|
|
||||||
await Account.createAccount(idapp, usernameOrig, circuitname);
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
ris = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
await Circuit.updateData(idapp, circuitname)
|
await Circuit.updateData(idapp, circuitname)
|
||||||
if (ris) {
|
if (ris) {
|
||||||
|
|||||||
@@ -1713,7 +1713,7 @@ router.post('/duprec/:table/:id', authenticate, async (req, res) => {
|
|||||||
|
|
||||||
return await mytable.findById(id).then(async (mydata) => {
|
return await mytable.findById(id).then(async (mydata) => {
|
||||||
|
|
||||||
const datadup = tools.CloneRecordToNew(mydata);
|
const datadup = tools.CloneRecordToNew(mydata, mytable.modelName);
|
||||||
const mynewrec = new mytable(datadup);
|
const mynewrec = new mytable(datadup);
|
||||||
|
|
||||||
return await mynewrec.save().then(async (rec) => {
|
return await mynewrec.save().then(async (rec) => {
|
||||||
|
|||||||
@@ -842,11 +842,16 @@ module.exports = {
|
|||||||
return JSON.parse(JSON.stringify(src));
|
return JSON.parse(JSON.stringify(src));
|
||||||
},
|
},
|
||||||
|
|
||||||
CloneRecordToNew(src) {
|
CloneRecordToNew(src, modelTable) {
|
||||||
const myrec = Object.assign({}, src);
|
const myrec = Object.assign({}, src);
|
||||||
delete myrec._doc['_id'];
|
delete myrec._doc['_id'];
|
||||||
myrec._id = new ObjectId();
|
myrec._id = new ObjectId();
|
||||||
|
|
||||||
|
if (modelTable === 'Circuit') {
|
||||||
|
myrec._doc.name = myrec._doc.name + ' copia';
|
||||||
|
myrec._doc.path = myrec._doc.path + '_copia';
|
||||||
|
}
|
||||||
|
|
||||||
return myrec._doc;
|
return myrec._doc;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.1.14
|
1.1.15
|
||||||
Reference in New Issue
Block a user