Skip to content

Commit ba075ca

Browse files
authored
Merge pull request #175 from replicatedhq/jelena-nil-fix-promote
Nil pointer fix when promoting release
2 parents 50baa59 + 8de3e41 commit ba075ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/kotsclient/channel.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type GraphQLResponseCreateChannel struct {
1818
}
1919

2020
type KotsGetChannelData struct {
21-
KotsChannel *KotsChannel `json:"getKotsChannel"`
21+
KotsChannel *KotsChannel `json:"channel"`
2222
}
2323

2424
type KotsCreateChannelData struct {
@@ -168,9 +168,9 @@ func (c *GraphQLClient) CreateChannel(appID string, name string, description str
168168
}
169169

170170
func (c *VendorV3Client) GetChannel(appID string, channelID string) (*channels.AppChannel, []channels.ChannelRelease, error) {
171-
var response = KotsGetChannelData{}
171+
response := KotsGetChannelData{}
172172

173-
url := fmt.Sprintf("/v3/app/%s/channel/%s", appID, channelID)
173+
url := fmt.Sprintf("/v3/app/%s/channel/%s", appID, url.QueryEscape(channelID))
174174
err := c.DoJSON("GET", url, http.StatusOK, nil, &response)
175175
if err != nil {
176176
return nil, nil, errors.Wrap(err, "get app channel")

0 commit comments

Comments
 (0)