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

Commit

Permalink
Fixed probloem 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 <bsmykla@vmware.com>
  • Loading branch information
Bart Smykla committed Jan 11, 2019
1 parent 16e9827 commit e7d0a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/secrets.go
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 e7d0a5c

Please sign in to comment.