diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2019-03-20 23:35:11 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2019-03-20 23:35:11 +0300 |
commit | 17b3c808ca5c2ffc7522905c23b1bba2a092321c (patch) | |
tree | 6c14e8d135db10ee17d3ca5c2c192efd3fe17fa8 /go/internal/command/twofactorrecover/twofactorrecover.go | |
parent | 18b7a5ccc078ddb2d61c8bcb86c1e2ea39c94630 (diff) | |
download | gitlab-shell-id-go-recovery-codes.tar.gz |
Implement getting recovery codes by usernameid-go-recovery-codes
Diffstat (limited to 'go/internal/command/twofactorrecover/twofactorrecover.go')
-rw-r--r-- | go/internal/command/twofactorrecover/twofactorrecover.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/go/internal/command/twofactorrecover/twofactorrecover.go b/go/internal/command/twofactorrecover/twofactorrecover.go index 227f462..e77a334 100644 --- a/go/internal/command/twofactorrecover/twofactorrecover.go +++ b/go/internal/command/twofactorrecover/twofactorrecover.go @@ -54,15 +54,11 @@ func (c *Command) displayRecoveryCodes(readWriter *readwriter.ReadWriter) { } func (c *Command) getRecoveryCodes() ([]string, error) { - if c.Args.GitlabKeyId == "" { - return nil, fmt.Errorf("Failed to get key id") - } - client, err := twofactorrecover.NewClient(c.Config) if err != nil { return nil, err } - return client.GetRecoveryCodes(c.Args.GitlabKeyId) + return client.GetRecoveryCodes(c.Args) } |