Skip to content

Commit 5014cf1

Browse files
committed
restore old default
1 parent 6ecff4e commit 5014cf1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

routers/web/explore/code.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func Code(ctx *context.Context) {
3434
language := ctx.FormTrim("l")
3535
keyword := ctx.FormTrim("q")
3636

37-
isFuzzy := ctx.FormBool("fuzzy")
37+
isFuzzy := ctx.FormOptionalBool("fuzzy").ValueOrDefault(true)
3838

3939
ctx.Data["Keyword"] = keyword
4040
ctx.Data["Language"] = language

routers/web/repo/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func Search(ctx *context.Context) {
2424
language := ctx.FormTrim("l")
2525
keyword := ctx.FormTrim("q")
2626

27-
isFuzzy := ctx.FormBool("fuzzy")
27+
isFuzzy := ctx.FormOptionalBool("fuzzy").ValueOrDefault(true)
2828

2929
ctx.Data["Keyword"] = keyword
3030
ctx.Data["Language"] = language

routers/web/user/code.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func CodeSearch(ctx *context.Context) {
3939
language := ctx.FormTrim("l")
4040
keyword := ctx.FormTrim("q")
4141

42-
isFuzzy := ctx.FormBool("fuzzy")
42+
isFuzzy := ctx.FormOptionalBool("fuzzy").ValueOrDefault(true)
4343

4444
ctx.Data["Keyword"] = keyword
4545
ctx.Data["Language"] = language

0 commit comments

Comments
 (0)