mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
fix digest parameters bug (fix #609)
This commit is contained in:
parent
ca78347dce
commit
4fc5091a97
2 changed files with 3 additions and 4 deletions
|
@ -24,8 +24,8 @@ getPostsParameters = function (terms) {
|
|||
if (typeof terms.limit !== 'undefined' && !!terms.limit)
|
||||
_.extend(parameters.options, {limit: parseInt(terms.limit)});
|
||||
|
||||
// hide future scheduled posts unless "showFuture" is set to true
|
||||
if (!parameters.showFuture)
|
||||
// hide future scheduled posts unless "showFuture" is set to true or postedAt is already defined
|
||||
if (!parameters.showFuture && !parameters.find.postedAt)
|
||||
parameters.find.postedAt = {$lte: new Date()};
|
||||
|
||||
// console.log(parameters);
|
||||
|
|
|
@ -126,8 +126,7 @@ viewParameters.pending = function (terms) {
|
|||
viewParameters.scheduled = function (terms) {
|
||||
return {
|
||||
find: {postedAt: {$gte: new Date()}},
|
||||
options: {sort: {postedAt: -1}},
|
||||
showFuture: true
|
||||
options: {sort: {postedAt: -1}}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue