Skip to content

Commit

Permalink
Fix request hanging - port irevenko/go-nyaa#2
Browse files Browse the repository at this point in the history
  • Loading branch information
Fesaa committed Feb 3, 2024
1 parent f41e95e commit 952f8aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/routes/search.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package routes

import (
"net/url"

"github.com/gofiber/fiber/v2"
"github.com/irevenko/go-nyaa/nyaa"
)
Expand Down Expand Up @@ -33,7 +35,7 @@ func Search(ctx *fiber.Ctx) error {

func (s *SearchRequest) ToNyaa() nyaa.SearchOptions {
n := nyaa.SearchOptions{}
n.Query = s.Query
n.Query = url.QueryEscape(s.Query)
if s.Provider != "" {
n.Provider = s.Provider
} else {
Expand Down

0 comments on commit 952f8aa

Please sign in to comment.