Skip to content

Commit

Permalink
Merge pull request #38 from pmorie/lili/fix-update
Browse files Browse the repository at this point in the history
Fix unpacking update request
  • Loading branch information
pmorie authored Mar 27, 2018
2 parents 51a5587 + cb2639e commit 589b24e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/rest/apisurface.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,17 @@ func (s *APISurface) UpdateHandler(w http.ResponseWriter, r *http.Request) {

func unpackUpdateRequest(r *http.Request) (*osb.UpdateInstanceRequest, error) {
osbRequest := &osb.UpdateInstanceRequest{}
if err := unmarshalRequestBody(r, osbRequest); err != nil {
return nil, err
}

vars := mux.Vars(r)
osbRequest.ServiceID = vars[osb.VarKeyServiceID]
osbRequest.InstanceID = vars[osb.VarKeyInstanceID]

planID := vars[osb.VarKeyPlanID]
if planID != "" {
osbRequest.PlanID = &planID
asyncQueryParamVal := r.FormValue(osb.AcceptsIncomplete)
if strings.ToLower(asyncQueryParamVal) == "true" {
osbRequest.AcceptsIncomplete = true
}

identity, err := retrieveOriginatingIdentity(r)
// This could be not found because platforms may support the feature
// but are not guaranteed to.
Expand Down

0 comments on commit 589b24e

Please sign in to comment.