0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Updated the count plugin to reference the type column

refs #10922
This commit is contained in:
Fabien O'Carroll 2019-07-24 12:22:12 +08:00
parent bb6b337be3
commit a52f15d3d3

View file

@ -19,7 +19,7 @@ module.exports = function (Bookshelf) {
if (options.context && options.context.public) {
// @TODO use the filter behavior for posts
qb.andWhere('posts.page', '=', false);
qb.andWhere('posts.type', '=', 'post');
qb.andWhere('posts.status', '=', 'published');
}
});
@ -36,7 +36,7 @@ module.exports = function (Bookshelf) {
if (options.context && options.context.public) {
// @TODO use the filter behavior for posts
qb.andWhere('posts.page', '=', false);
qb.andWhere('posts.type', '=', 'post');
qb.andWhere('posts.status', '=', 'published');
}
});