Go:CLI add new response function (#16347)

### What problem does this PR solve?

 add new response function

### Type of change

- [ ] New Feature (non-breaking change which adds functionality)
This commit is contained in:
maoyifeng
2026-06-25 16:49:47 +08:00
committed by GitHub
parent 091417980e
commit 6e7aa75e71
3 changed files with 74 additions and 3 deletions

View File

@@ -1972,7 +1972,7 @@ func (c *CLI) AdminShowUserSummaryCommand(cmd *Command) (ResponseIf, error) {
return nil, fmt.Errorf("failed to get user summary: HTTP %d, body: %s", resp.StatusCode, string(resp.Body))
}
var result CommonDataResponse
var result OrderedCommonDataResponse
if err = json.Unmarshal(resp.Body, &result); err != nil {
return nil, fmt.Errorf("get user summary failed: invalid JSON (%w)", err)
}
@@ -2191,7 +2191,7 @@ func (c *CLI) AdminShowUsersSummaryCommand(cmd *Command) (ResponseIf, error) {
return nil, fmt.Errorf("failed to get users summary: HTTP %d, body: %s", resp.StatusCode, string(resp.Body))
}
var result CommonDataResponse
var result OrderedCommonDataResponse
if err = json.Unmarshal(resp.Body, &result); err != nil {
return nil, fmt.Errorf("get users summary failed: invalid JSON (%w)", err)
}
@@ -2349,7 +2349,7 @@ func (c *CLI) AdminListUsersConditionCommand(cmd *Command) (ResponseIf, error) {
return nil, fmt.Errorf("failed to list users: HTTP %d, body: %s", resp.StatusCode, string(resp.Body))
}
var result CommonResponse
var result OrderedCommonResponse
if err = json.Unmarshal(resp.Body, &result); err != nil {
return nil, fmt.Errorf("list users failed: invalid JSON (%w)", err)
}