Versione 1.0.17
- Fix saldo pendente - aggiunto bottone markup Telegram - aggionta opzione per registrarsi direttamente su Telegram, senza doversi registrare ad un sito
This commit is contained in:
@@ -270,6 +270,7 @@ router.get('/test1', authenticate_noerror, async (req, res) => {
|
||||
router.post('/settable', authenticate, async (req, res) => {
|
||||
const params = req.body;
|
||||
const mytable = globalTables.getTableByTableName(params.table);
|
||||
|
||||
let mydata = req.body.data;
|
||||
let extrarec = {};
|
||||
if (mydata && mydata.hasOwnProperty('extrarec')) {
|
||||
@@ -277,6 +278,11 @@ router.post('/settable', authenticate, async (req, res) => {
|
||||
delete mydata['extrarec'];
|
||||
}
|
||||
|
||||
if (mydata === undefined) {
|
||||
console.error('MYDATA VUOTO !');
|
||||
return res.status(400).send('Mydata VUOTO');
|
||||
}
|
||||
|
||||
const fieldsvalue = { 'ALL': 1 };
|
||||
|
||||
mydata.idapp = req.user.idapp;
|
||||
@@ -483,12 +489,12 @@ router.post('/settable', authenticate, async (req, res) => {
|
||||
groupnameDest = myrec ? myrec.groupname : '';
|
||||
setnotif = true;
|
||||
}
|
||||
if (shared_consts.TABLES_CIRCUITS_NOTIFICATION.includes(params.table)) {
|
||||
/*if (shared_consts.TABLES_CIRCUITS_NOTIFICATION.includes(params.table)) {
|
||||
typedir = shared_consts.TypeNotifs.TYPEDIR_CIRCUITS;
|
||||
typeid = shared_consts.TypeNotifs.ID_CIRCUIT_NEW_REC;
|
||||
circuitnameDest = myrec ? myrec.name : '';
|
||||
setnotif = (myrec.visibility === 0); // Not send a notification to others if the Circuit is HIDDEN or PRIVATE
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if (setnotif) {
|
||||
|
||||
@@ -718,6 +718,9 @@ router.post('/updatesaldo', authenticate, async (req, res) => {
|
||||
const username = req.user.username;
|
||||
idapp = req.body.idapp;
|
||||
locale = req.body.locale;
|
||||
circuitId = req.body.circuitId;
|
||||
groupname = req.body.groupname;
|
||||
const lastdr = req.body['lastdr'] ? req.body['lastdr'] : '';
|
||||
|
||||
try {
|
||||
const userprofile = await User.getExtraInfoByUsername(idapp, username);
|
||||
@@ -725,6 +728,10 @@ router.post('/updatesaldo', authenticate, async (req, res) => {
|
||||
userprofile
|
||||
}
|
||||
|
||||
const arrrecnotif = await SendNotif.findAllNotifByUsernameIdAndIdApp(username, lastdr, idapp, shared_consts.LIMIT_NOTIF_FOR_USER);
|
||||
|
||||
ris.arrrecnotif = arrrecnotif;
|
||||
|
||||
return res.send({ ris });
|
||||
|
||||
} catch (e) {
|
||||
@@ -1372,6 +1379,10 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
|
||||
|
||||
await Circuit.setstrProvByIdCityCircuits(idapp);
|
||||
|
||||
} else if (mydata.dbop === 'updateSaldoAndTransato_AllAccounts') {
|
||||
|
||||
await Account.updateSaldoAndTransato_AllAccounts(idapp);
|
||||
|
||||
/*} else if (mydata.dbop === 'visuNave') {
|
||||
mystr = await Nave.getNavePos(idapp, parseInt(mydata.riga), parseInt(mydata.col));
|
||||
|
||||
@@ -1597,4 +1608,5 @@ router.post('/mgt', authenticate, async (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user