diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-02-21 08:54:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-21 08:54:05 +0800 |
commit | 0751153613bfd2e39cf28e83bbe04b76641d222f (patch) | |
tree | 91ec0e2bd81c9007f15f9ab255e177d2be138f24 /routers/api | |
parent | eaf9ded18201d8ad2587860ed98763ca040f0b71 (diff) | |
download | gitea-0751153613bfd2e39cf28e83bbe04b76641d222f.tar.gz gitea-0751153613bfd2e39cf28e83bbe04b76641d222f.zip |
refactor issue indexer, add some testing and fix a bug (#6131)
* refactor issue indexer, add some testing and fix a bug
* fix error copyright year on comment header
* issues indexer package import keep consistent
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/repo/issue.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index a129447c09..e63db4b6a4 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + issue_indexer "code.gitea.io/gitea/modules/indexer/issues" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" @@ -77,7 +78,7 @@ func ListIssues(ctx *context.APIContext) { var labelIDs []int64 var err error if len(keyword) > 0 { - issueIDs, err = models.SearchIssuesByKeyword(ctx.Repo.Repository.ID, keyword) + issueIDs, err = issue_indexer.SearchIssuesByKeyword(ctx.Repo.Repository.ID, keyword) } if splitted := strings.Split(ctx.Query("labels"), ","); len(splitted) > 0 { |