feat: implement core backend for team owner management with SQLite, auto-add APIs, and a frontend owner list component.

This commit is contained in:
2026-01-30 20:20:35 +08:00
parent 3c5bb04d82
commit 10cda012af
6 changed files with 125 additions and 14 deletions

View File

@@ -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
}