Notifications

Settings Notifications
User Panel
This commit is contained in:
Paolo Arena
2022-07-23 17:48:33 +02:00
parent e9ce597027
commit b06f1e4ab8
19 changed files with 472 additions and 121 deletions

View File

@@ -422,10 +422,12 @@ router.post('/panel', authenticate, async (req, res) => {
try {
const myuser = await User.findOne({idapp, username},
{username: 1, email: 1, verified_by_aportador: 1, aportador_solidario: 1,
{
username: 1, email: 1, verified_by_aportador: 1, aportador_solidario: 1,
lasttimeonline: 1,
deleted: 1,
profile: 1}).lean();
profile: 1,
}).lean();
if (!!myuser) {
res.send(myuser);
} else {
@@ -450,7 +452,6 @@ router.post('/notifs', authenticate, async (req, res) => {
send({code: server_constants.RIS_CODE_ERR_UNAUTHORIZED, msg: ''});
}
try {
if (!!myuser) {
if (tools.isArray(notifs) && notifs.length >= 0) {
@@ -465,7 +466,6 @@ router.post('/notifs', authenticate, async (req, res) => {
});
router.post('/login', (req, res) => {
var body = _.pick(req.body,
['username', 'password', 'idapp', 'keyappid', 'lang']);