Skip to content

Commit

Permalink
feat: added get categories
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Nov 13, 2023
1 parent 7c5c69a commit 60b3f3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 9 additions & 8 deletions compress/api_category.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ package compress
* @returns list of categories of the customer
*/



/**
*
* @param {string} apikey
* @param {string} customer
* @returns list of categories of the customer
*/
func (o *compress) GetCategories(requestBody categoriesRequest) ([]Category, error) {
//
if errs := validator.Validate(requestBody); errs != nil {

Check failure on line 12 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.18.x)

undefined: validator

Check failure on line 12 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.19.x)

undefined: validator

Check failure on line 12 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: validator

Check failure on line 12 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: validator
// values not valid, deal with errors here
return errs
}
//
return nil

Check failure on line 17 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.18.x)

not enough return values

Check failure on line 17 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.19.x)

not enough return values

Check failure on line 17 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

not enough return values

Check failure on line 17 in compress/api_category.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

not enough return values
}
1 change: 1 addition & 0 deletions compress/compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type ICompress interface {
HealthCheck() error
IsDebug() bool
GetUploads(uploadsPaginated UploadsPaginated) error
GetCategories(requestBody categoriesRequest) ([]Category, error)
//
}
//
Expand Down

0 comments on commit 60b3f3e

Please sign in to comment.