-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added update password
command
#255
Conversation
pkg/cmd/update/password.go
Outdated
) | ||
|
||
credentials, err := utils.GetCredentials(cmd) | ||
utils.PrintError(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utils.PrintError(err) | |
if err != nil { | |
utils.PrintError(err) | |
} | |
pkg/cmd/update/password.go
Outdated
Label: "Username", | ||
} | ||
updatePasswordRequest.Username, err = promptUsername.Run() | ||
utils.PrintError(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, please check if err != nil condition wherever printing err. Please update in all other places
updatePasswordRequest.OldPassword, err = promptOldPassword.Run() | ||
utils.PrintError(err) | ||
|
||
NEW_PASSWORD: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this, you can just add comment
// New password validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SarthakJain26 It was for a goto condition
if the new and confirm passwords fails, it agains runs the code under NEW_PASSWORD:
instead of the user requiring to rerun the command again
Signed-off-by: Baalekshan <[email protected]>
Signed-off-by: Baalekshan <[email protected]>
Signed-off-by: Baalekshan <[email protected]>
Signed-off-by: Baalekshan <[email protected]>
Signed-off-by: Baalekshan <[email protected]>
### Description:
Introduced
litmusctl update password
command,User can now update their passwords using litmusctl