Skip to content

Commit

Permalink
fix: fix bug in GetPaginationSubscriptions() API (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
dacongda authored Feb 3, 2024
1 parent 33b2f9d commit 0d6552f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion casdoorsdk/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (c *Client) GetPaginationSubscriptions(p int, pageSize int, queryMap map[st
queryMap["p"] = strconv.Itoa(p)
queryMap["pageSize"] = strconv.Itoa(pageSize)

url := c.GetUrl("get-providers", queryMap)
url := c.GetUrl("get-subscriptions", queryMap)

response, err := c.DoGetResponse(url)
if err != nil {
Expand Down
5 changes: 2 additions & 3 deletions casdoorsdk/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"strings"
Expand Down Expand Up @@ -210,7 +209,7 @@ func (c *Client) DoPostBytesRaw(url string, contentType string, body io.Reader)
}
}(resp.Body)

respBytes, err := ioutil.ReadAll(resp.Body)
respBytes, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -242,7 +241,7 @@ func (c *Client) doGetBytesRawWithoutCheck(url string) ([]byte, error) {
}
}(resp.Body)

respBytes, err := ioutil.ReadAll(resp.Body)
respBytes, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 0d6552f

Please sign in to comment.