Skip to content

Commit

Permalink
Fix * patter decode from url
Browse files Browse the repository at this point in the history
  • Loading branch information
demdxx committed May 3, 2024
1 parent 25de543 commit 763d1f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/server/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (srv *HTTPServer) get(c *fiber.Ctx) error {
func (srv *HTTPServer) keys(c *fiber.Ctx) error {
var (
ctx = c.UserContext()
pattern = c.Params("pattern")
pattern = strings.ReplaceAll(c.Params("pattern"), "%2A", "*")
dbnum, _ = c.ParamsInt("dbnum")
keys, err = srv.Driver.Keys(ctx, dbnum, pattern)
)
Expand All @@ -76,7 +76,7 @@ func (srv *HTTPServer) keys(c *fiber.Ctx) error {
func (srv *HTTPServer) list(c *fiber.Ctx) error {
var (
ctx = c.UserContext()
pattern = c.Params("pattern")
pattern = strings.ReplaceAll(c.Params("pattern"), "%2A", "*")
dbnum, _ = c.ParamsInt("dbnum")
format = strings.ToLower(c.Query("format", "json"))
data, err = srv.Driver.List(ctx, dbnum, pattern)
Expand Down

0 comments on commit 763d1f7

Please sign in to comment.