summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2023-07-07 13:10:13 -0400
committerGitHub <noreply@github.com>2023-07-07 17:10:13 +0000
commitcb01b8691db6ff13db3331dbe90ea291e1d6eadd (patch)
tree2702a23613951866fc9438ef3052ddf22e8b2bdf /routers/api/v1/repo
parent7586b5815ac503d6d3d0f37248da0c9cefd08ba5 (diff)
downloadgitea-cb01b8691db6ff13db3331dbe90ea291e1d6eadd.tar.gz
gitea-cb01b8691db6ff13db3331dbe90ea291e1d6eadd.zip
Add open/closed field support for issue index (#25708)
A couple of notes: * Future changes should refactor arguments into a struct * This filtering only is supported by meilisearch right now * Issue index number is bumped which will cause a re-index
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r--routers/api/v1/repo/issue.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go
index 49252f7a4b..e76775ae82 100644
--- a/routers/api/v1/repo/issue.go
+++ b/routers/api/v1/repo/issue.go
@@ -195,7 +195,7 @@ func SearchIssues(ctx *context.APIContext) {
}
var issueIDs []int64
if len(keyword) > 0 && len(repoIDs) > 0 {
- if issueIDs, err = issue_indexer.SearchIssuesByKeyword(ctx, repoIDs, keyword); err != nil {
+ if issueIDs, err = issue_indexer.SearchIssuesByKeyword(ctx, repoIDs, keyword, ctx.FormString("state")); err != nil {
ctx.Error(http.StatusInternalServerError, "SearchIssuesByKeyword", err)
return
}
@@ -394,7 +394,7 @@ func ListIssues(ctx *context.APIContext) {
var issueIDs []int64
var labelIDs []int64
if len(keyword) > 0 {
- issueIDs, err = issue_indexer.SearchIssuesByKeyword(ctx, []int64{ctx.Repo.Repository.ID}, keyword)
+ issueIDs, err = issue_indexer.SearchIssuesByKeyword(ctx, []int64{ctx.Repo.Repository.ID}, keyword, ctx.FormString("state"))
if err != nil {
ctx.Error(http.StatusInternalServerError, "SearchIssuesByKeyword", err)
return