mirror of https://github.com/halo-dev/halo
* fix: #1432 * doc: update CHANGELOG.mdpull/1438/head
parent
dd8968fee7
commit
97941e37c1
|
@ -1,5 +1,11 @@
|
|||
# CHANGELOG
|
||||
|
||||
# next
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- 修复 Content Api 中文章列表接口的 `keyword` 和 `categoryId` 参数为必传的问题。
|
||||
|
||||
# 1.4.10
|
||||
|
||||
## Features
|
||||
|
|
|
@ -72,15 +72,14 @@ public class PostController {
|
|||
* @param pageable store the priority of the sort algorithm
|
||||
* @param keyword search articles with keyword
|
||||
* @param categoryId search articles with categoryId
|
||||
* @return published articles that contains keywords and specific categoryid
|
||||
* @return published articles that contains keywords and specific categoryId
|
||||
*/
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("Lists posts")
|
||||
public Page<PostListVO> pageBy(
|
||||
@PageableDefault(sort = {"topPriority", "createTime"}, direction = DESC) Pageable pageable,
|
||||
@RequestParam(value = "keyword") String keyword,
|
||||
@RequestParam(value = "categoryId") Integer categoryId) {
|
||||
@RequestParam(value = "keyword", required = false) String keyword,
|
||||
@RequestParam(value = "categoryId", required = false) Integer categoryId) {
|
||||
PostQuery postQuery = new PostQuery();
|
||||
postQuery.setKeyword(keyword);
|
||||
postQuery.setCategoryId(categoryId);
|
||||
|
|
Loading…
Reference in New Issue