Skip to content

Commit

Permalink
solve
Browse files Browse the repository at this point in the history
  • Loading branch information
allan committed Jun 4, 2024
1 parent 0ee9f1a commit 4788224
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions compress/api_customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import (
)

/*
*/
*/
func (o *compress) GetCredentials() (*Credential, error) {
//
resp, err := o.restyPost(CREDENTIALS, BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey})
Expand All @@ -27,14 +26,13 @@ func (o *compress) GetCredentials() (*Credential, error) {
return &obj.Data, nil
}


/**
* Need to call before upload s3
*
*
* @returns customer_s3
*/
*/
func (o *compress) GetCustomerS3Zone() (*CustomerS3, error) {
resp, err := o.restyPost(GET_ZONE, BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey})
resp, err := o.restyPost(GET_ZONE(), BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey})
if err != nil {
return nil, err
}
Expand All @@ -43,10 +41,7 @@ func (o *compress) GetCustomerS3Zone() (*CustomerS3, error) {
if err := json.Unmarshal(resp.Body(), &obj); err != nil {
return nil, err
}
if obj.Response == "KO" {
return nil, fmt.Errorf("Error %s", obj.Message)
}
o.debugPrint(obj)
//
return &obj.Data, nil
}
return &obj, nil
}

0 comments on commit 4788224

Please sign in to comment.