Skip to content

Commit

Permalink
accept mode=fuzzy in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Oct 11, 2024
1 parent e8d84be commit 65eabc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ func getAppName(w http.ResponseWriter, r *http.Request) {

func query(w http.ResponseWriter, r *http.Request) {
t := time.Now()
mode := dictmgr.QueryModeFuzzy

jsonEncoder := json.NewEncoder(w)
w.Header().Set("Content-Type", "application/json")
Expand All @@ -75,8 +74,9 @@ func query(w http.ResponseWriter, r *http.Request) {
return
}

mode := dictmgr.QueryModeFuzzy
switch r.FormValue("mode") {
case "":
case "", "fuzzy":
case "startWith":
mode = dictmgr.QueryModeStartWith
case "regex":
Expand Down

0 comments on commit 65eabc8

Please sign in to comment.