Skip to content

Commit

Permalink
面板无设备数列表接口时暂不报错
Browse files Browse the repository at this point in the history
  • Loading branch information
wyx2685 committed Aug 31, 2024
1 parent 12fbcb1 commit ea0b7d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/panel/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ func (c *Client) GetUserList() ([]UserInfo, error) {
return c.UserList.Users, nil
}

// GetUserAlive will fetch the alive IPs for users
// GetUserAlive will fetch the alive_ip count for users
func (c *Client) GetUserAlive() (map[int]int, error) {
const path = "/api/v1/server/UniProxy/alivelist"
r, err := c.client.R().
ForceContentType("application/json").
Get(path)
if err = c.checkResponse(r, path, err); err != nil {
return nil, err
if err != nil {
return make(map[int]int), nil
}

if r != nil {
Expand Down

0 comments on commit ea0b7d8

Please sign in to comment.