Skip to content

Commit

Permalink
use SearchOptions.Copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Mar 15, 2024
1 parent 8145031 commit 569fbdd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions routers/web/user/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,9 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
// USING FINAL STATE OF opts FOR A QUERY.
var issues issues_model.IssueList
{
issueSearchOptions := issue_indexer.ToSearchOptions(keyword, opts)
issueSearchOptions.IsFuzzyKeyword = isFuzzy
issueIDs, _, err := issue_indexer.SearchIssues(ctx, issueSearchOptions)
issueIDs, _, err := issue_indexer.SearchIssues(ctx, issue_indexer.ToSearchOptions(keyword, opts).Copy(
func(o *issue_indexer.SearchOptions) { o.IsFuzzyKeyword = isFuzzy },
))
if err != nil {
ctx.ServerError("issueIDsFromSearch", err)
return
Expand All @@ -574,9 +574,9 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
// -------------------------------
// Fill stats to post to ctx.Data.
// -------------------------------
issueSearchOptions := issue_indexer.ToSearchOptions(keyword, opts)
issueSearchOptions.IsFuzzyKeyword = isFuzzy
issueStats, err := getUserIssueStats(ctx, ctxUser, filterMode, issueSearchOptions)
issueStats, err := getUserIssueStats(ctx, ctxUser, filterMode, issue_indexer.ToSearchOptions(keyword, opts).Copy(
func(o *issue_indexer.SearchOptions) { o.IsFuzzyKeyword = isFuzzy },
))
if err != nil {
ctx.ServerError("getUserIssueStats", err)
return
Expand Down

0 comments on commit 569fbdd

Please sign in to comment.