feat: implement core backend for team owner management with SQLite, auto-add APIs, and a frontend owner list component.
This commit is contained in:
@@ -206,12 +206,21 @@ func getS2AAccountCount() (int, error) {
|
||||
}
|
||||
|
||||
var result struct {
|
||||
NormalAccounts int `json:"normal_accounts"`
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Data struct {
|
||||
NormalAccounts int `json:"normal_accounts"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
if err := decodeJSON(resp.Body, &result); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return result.NormalAccounts, nil
|
||||
// S2A 返回 code=0 表示成功
|
||||
if result.Code != 0 {
|
||||
return 0, fmt.Errorf("S2A 返回错误: %s", result.Message)
|
||||
}
|
||||
|
||||
return result.Data.NormalAccounts, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user