Skip to content

Commit 569fbdd

Browse files
committed
use SearchOptions.Copy()
1 parent 8145031 commit 569fbdd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

routers/web/user/home.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,9 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
551551
// USING FINAL STATE OF opts FOR A QUERY.
552552
var issues issues_model.IssueList
553553
{
554-
issueSearchOptions := issue_indexer.ToSearchOptions(keyword, opts)
555-
issueSearchOptions.IsFuzzyKeyword = isFuzzy
556-
issueIDs, _, err := issue_indexer.SearchIssues(ctx, issueSearchOptions)
554+
issueIDs, _, err := issue_indexer.SearchIssues(ctx, issue_indexer.ToSearchOptions(keyword, opts).Copy(
555+
func(o *issue_indexer.SearchOptions) { o.IsFuzzyKeyword = isFuzzy },
556+
))
557557
if err != nil {
558558
ctx.ServerError("issueIDsFromSearch", err)
559559
return
@@ -574,9 +574,9 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
574574
// -------------------------------
575575
// Fill stats to post to ctx.Data.
576576
// -------------------------------
577-
issueSearchOptions := issue_indexer.ToSearchOptions(keyword, opts)
578-
issueSearchOptions.IsFuzzyKeyword = isFuzzy
579-
issueStats, err := getUserIssueStats(ctx, ctxUser, filterMode, issueSearchOptions)
577+
issueStats, err := getUserIssueStats(ctx, ctxUser, filterMode, issue_indexer.ToSearchOptions(keyword, opts).Copy(
578+
func(o *issue_indexer.SearchOptions) { o.IsFuzzyKeyword = isFuzzy },
579+
))
580580
if err != nil {
581581
ctx.ServerError("getUserIssueStats", err)
582582
return

0 commit comments

Comments
 (0)