Vulcan/packages/telescope-digest/lib/digest.js

26 lines
469 B
JavaScript
Raw Normal View History

2014-12-08 11:15:20 +09:00
viewNav.push({
route: 'posts_digest_default',
label: 'digest'
});
viewParameters.digest = function (terms) {
return {
find: {
postedAt: {
$gte: terms.after,
$lt: terms.before
}
},
options: {
sort: {sticky: -1, baseScore: -1, limit: 0}
}
};
}
getDigestURL = function(moment){
return Router.routes['posts_digest'].path({
year: moment.year(),
month: moment.month() + 1,
day: moment.date()
});
};