In meteor mongo shell this works:
db.acs_tasks.remove({name:'seb123'})
works:
WriteResult({ "nRemoved" : 1 })
But in Meteor app
FutureTasks.upsert({userid: details.userid}, {$inc: {count: -1}}, {multi: true}))
.then(txt => console.log('Test is :', txt))
.then(()=> ACSTasks.remove({name: details.userid})) // where name:details.userid is also seb123
.then(x => console.log('Removed number of jobs : ', x))
results in
Removed number of jobs : 0
Tried hardcoding into remove
.then(()=> ACSTasks.remove({name: 'seb123'}))
.then(x => console.log('Removed number of jobs : ', x))
also
Removed number of jobs : 0
This ACSTasks.remove({name: details.userid})) is part of the chain above which takes no argument, so even though it is a chain that waits for other functionality to happen before it is executed should not have any affect on returning zero instead of expected result as in meteor mongo?