From eee81e78f1b030451fe7c4dc87e571f75cfd5949 Mon Sep 17 00:00:00 2001 From: guqing <38999863+guqing@users.noreply.github.com> Date: Wed, 21 Sep 2022 21:58:12 +0800 Subject: [PATCH] fix: category and tag query parameters in post query (#2441) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### 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 ``` --- src/main/java/run/halo/app/content/PostQuery.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/run/halo/app/content/PostQuery.java b/src/main/java/run/halo/app/content/PostQuery.java index f80bf8050..37d217688 100644 --- a/src/main/java/run/halo/app/content/PostQuery.java +++ b/src/main/java/run/halo/app/content/PostQuery.java @@ -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 getContributors() { return listToSet(queryParams.get("contributor")); } @Nullable + @Schema(name = "category") public Set getCategories() { return listToSet(queryParams.get("category")); } @Nullable + @Schema(name = "tag") public Set getTags() { return listToSet(queryParams.get("tag")); }