Skip to content

Commit

Permalink
Revert "post body change to apply changes"
Browse files Browse the repository at this point in the history
- this change does not add support for 1.7
- according to the docs on a 1.7 Ops Manager, the /api/v0/installations
  endpoint takes a multi-part form body, not a JSON object

This reverts commit 53f2cea.
  • Loading branch information
davewalter committed Nov 19, 2016
1 parent 9b1b2c5 commit e2f4093
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/installations_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewInstallationsService(client httpClient) InstallationsService {
}

func (is InstallationsService) Trigger() (InstallationsServiceOutput, error) {
req, err := http.NewRequest("POST", "/api/v0/installations", strings.NewReader(`{enabled_errands: {}}`))
req, err := http.NewRequest("POST", "/api/v0/installations", strings.NewReader(`{}`))
if err != nil {
return InstallationsServiceOutput{}, err
}
Expand Down
2 changes: 1 addition & 1 deletion api/installations_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var _ = Describe("InstallationsService", func() {

body, err := ioutil.ReadAll(req.Body)
Expect(err).NotTo(HaveOccurred())
Expect(string(body)).To(Equal(`{enabled_errands: {}}`))
Expect(string(body)).To(Equal("{}"))
})

Context("when an error occurs", func() {
Expand Down

0 comments on commit e2f4093

Please sign in to comment.