Skip to content

Commit

Permalink
Update service.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-timothy-albert authored Feb 14, 2024
1 parent fa8a3b7 commit 1d0a2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pagination/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func HandleURL(w http.ResponseWriter, r *http.Request) {
ResultArray: make([]int, 0),
}

if attempts > 0 {
if attempts > 1 {
baseURL := fmt.Sprintf("%s://%s%s", r.URL.Scheme, r.Host, r.URL.Path)
if r.URL.Scheme == "" { // Fallback if Scheme is not available
baseURL = fmt.Sprintf("http://%s%s", r.Host, r.URL.Path)
Expand Down

0 comments on commit 1d0a2c8

Please sign in to comment.