mirror of https://github.com/halo-dev/halo
fix: category and tag query parameters in post query (#2441)
#### What type of PR is this? /kind api-change /kind improvement /area core /milestone 2.0 #### What this PR does / why we need it: 修复文章列表的分类、标签查询参数方法名和取值不一致导致无效问题 #### Which issue(s) this PR fixes: Fixes #2439 #### Special notes for your reviewer: /cc @halo-dev/sig-halo #### Does this PR introduce a user-facing change? ```release-note None ```pull/2453/head
parent
ac8dd74211
commit
eee81e78f1
|
@ -1,5 +1,6 @@
|
|||
package run.halo.app.content;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
@ -20,16 +21,19 @@ public class PostQuery extends IListRequest.QueryListRequest {
|
|||
}
|
||||
|
||||
@Nullable
|
||||
@Schema(name = "contributor")
|
||||
public Set<String> getContributors() {
|
||||
return listToSet(queryParams.get("contributor"));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Schema(name = "category")
|
||||
public Set<String> getCategories() {
|
||||
return listToSet(queryParams.get("category"));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Schema(name = "tag")
|
||||
public Set<String> getTags() {
|
||||
return listToSet(queryParams.get("tag"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue