Du använder för många argument.
Ändra detta:
viewerObj.update({_id: currentIDViewerVar} , {minutesWatched: 5},{upsert:true} , function (err,result) {
if (err) throw err;
console.log("Viewer " + userNameVar + " gespeichert");
console.log("minsWatched" +minsWatched);
});
till detta:
viewerObj.update({_id: currentIDViewerVar, minutesWatched: 5}, {upsert:true}, function (err,result) {
if (err) throw err;
console.log("Viewer " + userNameVar + " gespeichert");
console.log("minsWatched" +minsWatched);
});
Se dokumenten: