add transactionsEnabled : enable the circuit to the transactions
This commit is contained in:
@@ -175,6 +175,9 @@ const CircuitSchema = new Schema({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
transactionsEnabled: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
CircuitSchema.pre('save', async function(next) {
|
CircuitSchema.pre('save', async function(next) {
|
||||||
@@ -230,6 +233,8 @@ CircuitSchema.statics.getWhatToShow = function(idapp, username) {
|
|||||||
date_updated: 1,
|
date_updated: 1,
|
||||||
nome_valuta: 1,
|
nome_valuta: 1,
|
||||||
fido_scoperto_default: 1,
|
fido_scoperto_default: 1,
|
||||||
|
deperimento: 1,
|
||||||
|
transactionsEnabled: 1,
|
||||||
qta_max_default: 1,
|
qta_max_default: 1,
|
||||||
valuta_per_euro: 1,
|
valuta_per_euro: 1,
|
||||||
symbol: 1,
|
symbol: 1,
|
||||||
|
|||||||
@@ -3984,19 +3984,14 @@ if (true) {
|
|||||||
|
|
||||||
if (userDest) {
|
if (userDest) {
|
||||||
cmd = shared_consts.FRIENDSCMD.REMOVE_FROM_MYFRIENDS;
|
cmd = shared_consts.FRIENDSCMD.REMOVE_FROM_MYFRIENDS;
|
||||||
const foundIfAlreadyFriend = await User.isMyFriend(user.idapp, data.username, data.userDest);
|
// Rimuovilo nelle Amicizie
|
||||||
|
const req = tools.getReqByPar(user.idapp, username_action);
|
||||||
if (foundIfAlreadyFriend) {
|
const ris = await User.setFriendsCmd(req, user.idapp, data.username, data.userDest, cmd);
|
||||||
// Aggiungilo nelle Amicizie
|
if (ris) {
|
||||||
const ris = await User.setFriendsCmd(req, user.idapp, data.username, data.userDest, cmd);
|
const msgDest = printf(getstr(user.lang, 'MSG_FRIENDS_NOT_ACCEPTED_CONFIRMED'), data.username);
|
||||||
if (ris) {
|
|
||||||
const msgDest = printf(getstr(user.lang, 'MSG_FRIENDS_NOT_ACCEPTED_CONFIRMED'), data.username);
|
|
||||||
|
|
||||||
await local_sendMsgTelegram(user.idapp, data.userDest, msgDest);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
await local_sendMsgTelegram(user.idapp, data.userDest, msgDest);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user