fix: intimate posts should not be searchable in the category list (#1379)

pull/1389/head
zhaoguhong 2021-05-20 18:03:09 +08:00 committed by GitHub
parent 4c68ae9e89
commit 27c715ac7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ public class CategoryController {
Page<Post> postPage =
postCategoryService.pagePostBy(category.getId(),
Sets.immutableEnumSet(PostStatus.PUBLISHED, PostStatus.INTIMATE), pageable);
Sets.immutableEnumSet(PostStatus.PUBLISHED), pageable);
return postService.convertToListVo(postPage);
}
}

View File

@ -102,7 +102,7 @@ public class CategoryModel {
Sort.by(DESC, "topPriority", "createTime"));
Page<Post> postPage =
postCategoryService.pagePostBy(category.getId(), Sets
.immutableEnumSet(PostStatus.PUBLISHED, PostStatus.INTIMATE), pageable);
.immutableEnumSet(PostStatus.PUBLISHED), pageable);
Page<PostListVO> posts = postService.convertToListVo(postPage);
// Generate meta description.