ver: 0.5.62
Conti Collettivi visibili solo se sei admin...
This commit is contained in:
@@ -41,6 +41,7 @@ router.post('/load', authenticate, async (req, res) => {
|
|||||||
|
|
||||||
// Check if ìs a Notif to read
|
// Check if ìs a Notif to read
|
||||||
const idnotif = req.body['idnotif'] ? req.body['idnotif'] : '';
|
const idnotif = req.body['idnotif'] ? req.body['idnotif'] : '';
|
||||||
|
const lastdr = req.body['lastdr'] ? req.body['lastdr'] : '';
|
||||||
SendNotif.setNotifAsRead(idapp, usernameOrig, idnotif);
|
SendNotif.setNotifAsRead(idapp, usernameOrig, idnotif);
|
||||||
|
|
||||||
const whatshow = Circuit.getWhatToShow(idapp, req.user.username);
|
const whatshow = Circuit.getWhatToShow(idapp, req.user.username);
|
||||||
@@ -75,7 +76,10 @@ router.post('/load', authenticate, async (req, res) => {
|
|||||||
data.account = await Account.getAccountByUsernameAndCircuitId(idapp, '', data._id, false, '', data.path);
|
data.account = await Account.getAccountByUsernameAndCircuitId(idapp, '', data._id, false, '', data.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
res.send({ circuit: data, users_in_circuit });
|
const arrrecnotif = await SendNotif.findAllNotifByUsernameIdAndIdApp(req.user.username, lastdr, idapp);
|
||||||
|
const useraccounts = await Account.getUserAccounts(idapp, req.user.username);
|
||||||
|
|
||||||
|
res.send({ circuit: data, users_in_circuit, arrrecnotif, useraccounts });
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Error in Circuits', e);
|
console.error('Error in Circuits', e);
|
||||||
|
|||||||
Reference in New Issue
Block a user