Skip to content

Commit

Permalink
统一代码
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteReimu committed Mar 14, 2024
1 parent c8614a8 commit 7c6a06b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fav.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (c *Client) DeleteFavourResources(mediaId int, resources []Resource, platfo
"csrf": biliJct,
})
if len(platform) > 0 {
r.SetQueryParam("platform", platform)
r = r.SetQueryParam("platform", platform)
}
resp, err := r.Post("https://api.bilibili.com/x/v3/fav/resource/batch-del")
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions message.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ func (c *Client) GetSessionMessages(talkerId, sessionType, size int, mobiApp str
"session_type": strconv.Itoa(sessionType),
})
if size != 0 {
r.SetQueryParam("size", strconv.Itoa(size))
r = r.SetQueryParam("size", strconv.Itoa(size))
}
if len(mobiApp) > 0 {
r.SetQueryParam("mobi_app", mobiApp)
r = r.SetQueryParam("mobi_app", mobiApp)
}
resp, err := r.Get("https://api.vc.bilibili.com/svr_sync/v1/svr_sync/fetch_session_msgs")
if err != nil {
Expand Down Expand Up @@ -310,7 +310,7 @@ func GetSessions(sessionType int, mobiApp string) (*SessionList, error) {
func (c *Client) GetSessions(sessionType int, mobiApp string) (*SessionList, error) {
r := c.resty().R().SetHeader("Content-Type", "application/x-www-form-urlencoded").SetQueryParam("session_type", strconv.Itoa(sessionType))
if len(mobiApp) > 0 {
r.SetQueryParam("mobi_app", mobiApp)
r = r.SetQueryParam("mobi_app", mobiApp)
}
resp, err := r.Get("https://api.vc.bilibili.com/session_svr/v1/session_svr/get_sessions")
if err != nil {
Expand Down

0 comments on commit 7c6a06b

Please sign in to comment.