Skip to content

Commit 461ac11

Browse files
authored
apikey: Fix broken user apikey create command (#548)
Fixes a panic in the `userauthapi.CreateKey()` call due to the missing `api.API`. Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
1 parent 976548b commit 461ac11

File tree

3 files changed

+4
-46
lines changed

3 files changed

+4
-46
lines changed

cmd/auth/key/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ var createCmd = &cobra.Command{
3030
PreRunE: cobra.MaximumNArgs(0),
3131
RunE: func(cmd *cobra.Command, args []string) error {
3232
res, err := userauthapi.CreateKey(userauthapi.CreateKeyParams{
33+
API: ecctl.Get().API,
3334
Description: cmd.Flag("description").Value.String(),
3435
})
3536
if err != nil {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.13
44

55
require (
66
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
7-
github.com/elastic/cloud-sdk-go v1.7.0
7+
github.com/elastic/cloud-sdk-go v1.7.1-0.20220114092459-af5391db2912
88
github.com/go-openapi/runtime v0.21.0
99
github.com/go-openapi/strfmt v0.21.1
1010
github.com/pkg/errors v0.9.1

0 commit comments

Comments
 (0)