We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7779786 commit 409cd9cCopy full SHA for 409cd9c
internal/codespaces/api/api_test.go
@@ -28,13 +28,13 @@ func TestListCodespaces(t *testing.T) {
28
}
29
30
page := 1
31
- if r.URL.Query().Has("page") {
32
- page, _ = strconv.Atoi(r.URL.Query()["page"][0])
+ if r.URL.Query().Get("page") != "" {
+ page, _ = strconv.Atoi(r.URL.Query().Get("page"))
33
34
35
per_page := 0
36
- if r.URL.Query().Has("per_page") {
37
- per_page, _ = strconv.Atoi(r.URL.Query()["per_page"][0])
+ if r.URL.Query().Get("per_page") != "" {
+ per_page, _ = strconv.Atoi(r.URL.Query().Get("per_page"))
38
39
40
codespaces := []*Codespace{}
0 commit comments