Anda menggunakan terlalu banyak argumen.
Ubah ini:
viewerObj.update({_id: currentIDViewerVar} , {minutesWatched: 5},{upsert:true} , function (err,result) {
if (err) throw err;
console.log("Viewer " + userNameVar + " gespeichert");
console.log("minsWatched" +minsWatched);
});
untuk ini:
viewerObj.update({_id: currentIDViewerVar, minutesWatched: 5}, {upsert:true}, function (err,result) {
if (err) throw err;
console.log("Viewer " + userNameVar + " gespeichert");
console.log("minsWatched" +minsWatched);
});
Lihat dokumen: