Skip to content

Commit

Permalink
fix: update api response (#30)
Browse files Browse the repository at this point in the history
* fix: update api response

* chore: update version
  • Loading branch information
ecmadao authored Dec 26, 2022
1 parent 16fd58c commit 8194ab4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.6-beta
0.0.6-beta.2
4 changes: 2 additions & 2 deletions client/database_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ func (c *client) ListRole(ctx context.Context, instanceID int) ([]*api.Role, err
}

var roleList struct {
RoleList []*api.Role `json:"roleList"`
Roles []*api.Role `json:"roles"`
}

err = json.Unmarshal(body, &roleList)
if err != nil {
return nil, err
}

return roleList.RoleList, nil
return roleList.Roles, nil
}

// UpdateRole updates the role in instance.
Expand Down

0 comments on commit 8194ab4

Please sign in to comment.