Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions clients/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,12 @@ func (c *Client) CreateApplicationVersion(applicationID string) (*CreateApplicat

// GetOrganizationApplications retrieves all applications for an organization
func (c *Client) GetOrganizationApplications(organizationID string) (*GetOrganizationApplicationsResponse, error) {
path := fmt.Sprintf("/organizations/applications?organizationId=%s", organizationID)
req := GetOrganizationApplicationsRequest{
OrganizationID: organizationID,
}

var resp GetOrganizationApplicationsResponse
err := c.doRequest("GET", path, nil, &resp)
err := c.doRequest("POST", "/organizations/applications", req, &resp)
if err != nil {
return nil, err
}
Expand Down
7 changes: 6 additions & 1 deletion clients/api/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ type ApplicationItem struct {
GithubRepositoryName string `json:"githubRepositoryName"`
}

// GetOrganizationApplicationsResponse represents the response from GET /organizations/applications
// GetOrganizationApplicationsRequest represents the request body for POST /organizations/applications
type GetOrganizationApplicationsRequest struct {
OrganizationID string `json:"organizationId"`
}

// GetOrganizationApplicationsResponse represents the response from POST /organizations/applications
type GetOrganizationApplicationsResponse struct {
Applications []ApplicationItem `json:"applications"`
}