Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
Fixed problem of returning nil instead of empty array
Browse files Browse the repository at this point in the history
When there is no secrets right now instead of nil
endpoint will return empty array

Signed-off-by: Bart Smykla <[email protected]>
  • Loading branch information
Bart Smykla authored and alexellis committed Jan 11, 2019
1 parent 16e9827 commit 3cac0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func getSecrets(c *client.Client, _ []byte) (responseStatus int, responseBody []
)
}

var results []requests.Secret
results := []requests.Secret{}

for _, s := range secrets {
results = append(results, requests.Secret{Name: s.Spec.Name, Value: string(s.Spec.Data)})
Expand Down

0 comments on commit 3cac0cc

Please sign in to comment.