Fix error on successful login.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
This commit is contained in:
parent
1a8edd0d55
commit
22f87eb9be
1 changed files with 2 additions and 2 deletions
|
@ -219,7 +219,7 @@ func Login(authConfig *AuthConfig, factory *utils.HTTPRequestFactory) (string, e
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if resp.StatusCode == 200 {
|
if resp.StatusCode == 200 {
|
||||||
status = "Login Succeeded"
|
return "Login Succeeded", nil
|
||||||
} else if resp.StatusCode == 401 {
|
} else if resp.StatusCode == 401 {
|
||||||
return "", fmt.Errorf("Wrong login/password, please try again")
|
return "", fmt.Errorf("Wrong login/password, please try again")
|
||||||
} else if resp.StatusCode == 403 {
|
} else if resp.StatusCode == 403 {
|
||||||
|
@ -247,7 +247,7 @@ func Login(authConfig *AuthConfig, factory *utils.HTTPRequestFactory) (string, e
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if resp.StatusCode == 200 {
|
if resp.StatusCode == 200 {
|
||||||
status = "Login Succeeded"
|
return "Login Succeeded", nil
|
||||||
} else if resp.StatusCode == 401 {
|
} else if resp.StatusCode == 401 {
|
||||||
return "", fmt.Errorf("Wrong login/password, please try again")
|
return "", fmt.Errorf("Wrong login/password, please try again")
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue