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

27 lines
491 B
JavaScript
Raw Normal View History

viewsMenu.push({
route: 'postsSingleDayDefault',
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,
2014-12-08 11:15:20 +09:00
$lt: terms.before
}
},
options: {
sort: {sticky: -1, score: -1}
2014-12-08 11:15:20 +09:00
}
};
};
2014-12-08 11:15:20 +09:00
getDateURL = function(moment){
return Router.path('postsSingleDay', {
2014-12-08 11:15:20 +09:00
year: moment.year(),
month: moment.month() + 1,
day: moment.date()
});
};