Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Fix /v2/service_instances/#/parameters error #64

Merged
merged 1 commit into from
Jan 11, 2021
Merged
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
8 changes: 8 additions & 0 deletions pkg/broker/instance_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,14 @@ func (b Broker) GetInstance(ctx context.Context, instanceID string) (spec domain
return spec, apiresponses.NewFailureResponse(err, http.StatusInternalServerError, "get-instance")
}

if enc, ok := spec.Parameters.(string); ok {
p, err := decodePlan(enc)
if err != nil {
return spec, apiresponses.NewFailureResponse(err, http.StatusInternalServerError, "get-instance")
}
spec.Parameters = p.SafeCopy()
}

return spec, nil
}

Expand Down