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

28 lines
513 B
JavaScript
Raw Normal View History

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