Skip to content

Commit 95bf8c5

Browse files
committed
fix(blog): fix blog visibility fetching
Signed-off-by: Jayne Doe <[email protected]>
1 parent 8784cb9 commit 95bf8c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ const getOneArt = async (req, res, next) => {
5656
const getAllBlogs = async (req, res, next) => {
5757
try {
5858
res.locals.blogs = await blogHandler.listBlogPosts(
59-
req.query.page || 1, res.locals.pageMax || 10, res.locals.visible || true,
59+
req.query.page || 1, res.locals.pageMax || 10,
60+
res.locals.visible === undefined || res.locals.visible,
6061
);
6162
res.locals.blogCount = await blogHandler.getTotalBlogCount(true);
6263
next();

0 commit comments

Comments
 (0)