- Add saldo to member's list
This commit is contained in:
@@ -31,7 +31,6 @@ async function getCircuitRecAdminsInfo(idapp, data) {
|
||||
router.post('/load', authenticate, async (req, res) => {
|
||||
const idapp = req.body.idapp;
|
||||
const path = req.body.path;
|
||||
const circuitId = req.body.circuitId;
|
||||
const usernameOrig = req.user.username;
|
||||
|
||||
try {
|
||||
@@ -48,7 +47,7 @@ router.post('/load', authenticate, async (req, res) => {
|
||||
|
||||
const whatshowUsers = await User.getWhatToShow_IfFriends(idapp, req.user.username);
|
||||
|
||||
let users_in_circuit = [];
|
||||
/*let users_in_circuit = [];
|
||||
|
||||
if (data) {
|
||||
users_in_circuit = await User.find(
|
||||
@@ -61,6 +60,9 @@ router.post('/load', authenticate, async (req, res) => {
|
||||
whatshowUsers,
|
||||
).lean();
|
||||
}
|
||||
*/
|
||||
|
||||
const users_in_circuit = await Circuit.getUsersSingleCircuit(idapp, req.user.username, data.name, data._id);
|
||||
|
||||
data = await getCircuitRecAdminsInfo(idapp, data);
|
||||
|
||||
|
||||
@@ -426,6 +426,10 @@ router.post('/settable', authenticate, async (req, res) => {
|
||||
await SendNotif.createNewNotification(req, res, {groupnameDest, circuitnameDest}, params.table, myrec, typedir, typeid);
|
||||
}
|
||||
|
||||
if (params.table === 'circuits') {
|
||||
await Circuit.updateData(myrec.idapp, myrec.name);
|
||||
}
|
||||
|
||||
if (params.table === shared_consts.TAB_MYGROUPS && isnewrec) {
|
||||
// nuovo Record:
|
||||
// aggiungi il creatore al gruppo stesso
|
||||
@@ -789,6 +793,7 @@ router.patch('/chval', authenticate, async (req, res) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mydata.table === 'users') {
|
||||
if (camporequisiti) {
|
||||
await User.checkIfSbloccatiRequisiti(idapp, allData, id);
|
||||
|
||||
Reference in New Issue
Block a user