Skip to content

Commit

Permalink
solve category
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Nov 16, 2023
1 parent efcf716 commit 010d82c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion compress/api_category.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ func (o *compress) GetCategories() ([]Category, error) {
* @param {string} customer
* @returns list of categories of the customer
*/
func (o *compress) CreateCategory( requestBody createCategoryRequest ) (*Category, error) {
func (o *compress) CreateCategory( name string ) (*Category, error) {
requestBody := &createCategoryRequest{
BaseModel: BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey},
CategoryName: name,
}
if errs := validator.Validate(requestBody); errs != nil {
// values not valid, deal with errors here
return nil, errs
Expand Down
2 changes: 1 addition & 1 deletion compress/api_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (o *compress) SetPublishedUpload( jobid, published int ) (*VideoUploadInfo
requestBody := &publishedUploadRequest{
BaseModel: BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey},
JobId: jobid,
Published: published
Published: published,
}
//
if errs := validator.Validate(requestBody); errs != nil {
Expand Down
2 changes: 1 addition & 1 deletion compress/compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type ICompress interface {
SetPublishedUpload( jobid, published int ) (*VideoUploadInfo, error)
UploadS3(destinationFolder string, filename string) error
GetCategories() ([]Category, error)
CreateCategory(requestBody createCategoryRequest) (*Category, error)
CreateCategory( name string ) (*Category, error)
GetRestreamers( startFrom, amount int ) ([]Restreamer, error)
GetSingleRestreamer( instanceName string ) (*Restreamer, error)
//
Expand Down

0 comments on commit 010d82c

Please sign in to comment.