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;
|
package run.halo.app.content;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.springframework.lang.Nullable;
|
import org.springframework.lang.Nullable;
|
||||||
|
@ -20,16 +21,19 @@ public class PostQuery extends IListRequest.QueryListRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@Schema(name = "contributor")
|
||||||
public Set<String> getContributors() {
|
public Set<String> getContributors() {
|
||||||
return listToSet(queryParams.get("contributor"));
|
return listToSet(queryParams.get("contributor"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@Schema(name = "category")
|
||||||
public Set<String> getCategories() {
|
public Set<String> getCategories() {
|
||||||
return listToSet(queryParams.get("category"));
|
return listToSet(queryParams.get("category"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@Schema(name = "tag")
|
||||||
public Set<String> getTags() {
|
public Set<String> getTags() {
|
||||||
return listToSet(queryParams.get("tag"));
|
return listToSet(queryParams.get("tag"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue