Fix problem with dates in selector being unpickled as a String

This commit is contained in:
John Supplee 2021-02-26 23:19:12 +02:00
parent 223cc07139
commit a63a61e7fc
3 changed files with 61 additions and 24 deletions

View file

@ -751,19 +751,19 @@ Meteor.publish('previousPage', function(sessionId) {
});
function findCards(sessionId, selector, projection, errors = null) {
// check(selector, Object);
// check(projection, Object);
const userId = Meteor.userId();
console.log('selector:', selector);
console.log('projection:', projection);
// if (selector.dueAt) {
// console.log('dueAt:', typeof selector.dueAt.$lt, selector.dueAt.$lt.constructor.name, selector.dueAt.$lt);
// }
let cards;
if (!errors || !errors.hasErrors()) {
cards = Cards.find(selector, projection);
}
console.log('count:', cards.count());
const update = {
$set: {
totalHits: 0,