Skip to content

Commit

Permalink
update categories method
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Nov 16, 2023
1 parent 21cc186 commit d48c8b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compress/api_category.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ func (o *compress) GetCategories() ([]Category, error) {
}
o.debugPrint(resp)
if resp.IsError() {
return nil, fmt.Errorf("")
return nil, fmt.Errorf("categories error")
}
var obj []Category
if err := json.Unmarshal(resp.Body(), &obj); err != nil {

Check failure on line 33 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.19.x)

undefined: json

Check failure on line 33 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.19.x)

undefined: json

Check failure on line 33 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: json

Check failure on line 33 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: json

Check failure on line 33 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: json

Check failure on line 33 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: json
return nil, err
}
//
return nil, nil
return resp, nil

Check failure on line 37 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.19.x)

cannot use resp (variable of type *resty.Response) as type []Category in return statement

Check failure on line 37 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.19.x)

cannot use resp (variable of type *resty.Response) as type []Category in return statement

Check failure on line 37 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

cannot use resp (variable of type *resty.Response) as []Category value in return statement

Check failure on line 37 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

cannot use resp (variable of type *resty.Response) as []Category value in return statement

Check failure on line 37 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

cannot use resp (variable of type *resty.Response) as []Category value in return statement

Check failure on line 37 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

cannot use resp (variable of type *resty.Response) as []Category value in return statement
}

/**
Expand Down

0 comments on commit d48c8b1

Please sign in to comment.