Popupmenu Todo:
- Show Task Completed
This commit is contained in:
@@ -20,6 +20,9 @@ const cfgserverSchema = new Schema({
|
|||||||
minlength: 1,
|
minlength: 1,
|
||||||
unique: true,
|
unique: true,
|
||||||
},
|
},
|
||||||
|
userId: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
valore: {
|
valore: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ router.post('/updateval', authenticate, (req, res) => {
|
|||||||
console.log('/updateval', req.body.pairval);
|
console.log('/updateval', req.body.pairval);
|
||||||
pair = req.body.pairval;
|
pair = req.body.pairval;
|
||||||
|
|
||||||
cfgserver.findOneAndUpdate({chiave: pair.chiave}, { $set: pair }, { new: false }).then((item) => {
|
cfgserver.findOneAndUpdate({chiave: pair.chiave, userID: pair.userId}, { $set: pair }, { new: false }).then((item) => {
|
||||||
// cfgserver.find({ chiave: pair.chiave }, (err, item) => {
|
// cfgserver.find({ chiave: pair.chiave }, (err, item) => {
|
||||||
res.status(200).send();
|
res.status(200).send();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ function populateDBadmin() {
|
|||||||
const cfgserv = [{
|
const cfgserv = [{
|
||||||
_id: new ObjectID(),
|
_id: new ObjectID(),
|
||||||
chiave: 'vers',
|
chiave: 'vers',
|
||||||
|
userId: 'ALL',
|
||||||
valore: '0.0.41'
|
valore: '0.0.41'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log('ERROR: sendNotificationToUser', error)
|
console.log('ERROR: sendNotificationToUser', error.data.body)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// q.allSettled(parallelSubscriptionCalls).then((pushResults) => {
|
// q.allSettled(parallelSubscriptionCalls).then((pushResults) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user