Skip to content

Commit

Permalink
remove comments and unnecessary code
Browse files Browse the repository at this point in the history
Signed-off-by: shivam <[email protected]>
  • Loading branch information
shivam-Purohit committed Sep 10, 2024
1 parent 93fae02 commit c870dab
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions pkg/apis/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ func CreateProjectRequest(projectName string, cred types.Credentials) (CreatePro
}
}

// type listProjectResponse struct {
// Data []struct {
// ID string `json:"ProjectID"`
// Name string `json:"Name"`
// CreatedAt int64 `json:"CreatedAt"`
// } `json:"data"`
// Errors []struct {
// Message string `json:"message"`
// Path []string `json:"path"`
// } `json:"errors"`
// }

type listProjectResponse struct {
Data struct {
Projects []struct {
Expand Down Expand Up @@ -125,13 +113,11 @@ func ListProject(cred types.Credentials) (listProjectResponse, error) {
var data listProjectResponse
err = json.Unmarshal(bodyBytes, &data)
if err != nil {
utils.Red.Println("here1")
return listProjectResponse{}, err

}

if len(data.Errors) > 0 {
utils.Red.Println("here12")
return listProjectResponse{}, errors.New(data.Errors[0].Message)
}

Expand Down

0 comments on commit c870dab

Please sign in to comment.