From ea0b7d8f40e9b482cadda5ffa3bc6ea6c40d3b3c Mon Sep 17 00:00:00 2001 From: wyx2685 Date: Sun, 1 Sep 2024 05:27:11 +0900 Subject: [PATCH] =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=97=A0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E6=95=B0=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=97=B6=E6=9A=82?= =?UTF-8?q?=E4=B8=8D=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/panel/user.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/panel/user.go b/api/panel/user.go index 35304f9..df9cc50 100644 --- a/api/panel/user.go +++ b/api/panel/user.go @@ -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 {