fix: avoid sync project panic

This commit is contained in:
Qu Xuan
2020-10-27 16:14:39 +08:00
parent 4bd45eef3e
commit 6256b3f88d
+3
View File
@@ -79,6 +79,9 @@ func (client *SQcloudClient) GetProjects() ([]SProject, error) {
projects := []SProject{}
params := map[string]string{"allList": "1"}
resp, err := client.accountRequestRequest("DescribeProject", params)
if err != nil {
return nil, errors.Wrapf(err, "DescribeProject")
}
err = resp.Unmarshal(&projects)
if err != nil {
return nil, errors.Wrap(err, "resp.Unmarshal")