Popupmenu Todo:

- Show Task Completed
This commit is contained in:
Paolo Arena
2019-03-04 17:28:41 +01:00
parent 8f1ee2a7da
commit 8fe9199162
4 changed files with 6 additions and 2 deletions

View File

@@ -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,
}, },

View File

@@ -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 => {

View File

@@ -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'
}]; }];

View File

@@ -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) => {