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

28 lines
521 B
JavaScript
Raw Normal View History

2015-04-24 10:49:24 +09:00
Telescope.menus.register("viewsMenu", {
route: 'postsSingleDayDefault',
label: 'singleday',
description: 'posts_of_a_single_day'
});
viewParameters.singleday = function (terms) {
return {
find: {
postedAt: {
$gte: terms.after,
$lt: terms.before
}
},
options: {
sort: {sticky: -1, score: -1}
}
};
};
getDateURL = function(moment){
return Router.path('postsSingleDay', {
year: moment.year(),
month: moment.month() + 1,
day: moment.date()
});
};