Skip to content

Commit

Permalink
Alter console output of UpdateUserPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
sc-zenokerr committed Jul 5, 2024
1 parent 3b349b4 commit a62356f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions db/users/update_password.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ func UpdateUserPassword(ctx context.Context, app, addonUUID, username string) er
if err != nil {
return errors.Wrap(ctx, err, "update password of the given database user")
}
} else {
databaseUser, err = c.DatabaseUserResetPassword(ctx, app, addonUUID, username)
if err != nil {
return errors.Wrap(ctx, err, "reset the password of the given database user")
}

fmt.Printf("User \"%s\" updated with password \"%s\".\n", databaseUser.Name, databaseUser.Password)
fmt.Printf("User \"%s\" password updated.\n", databaseUser.Name)
return nil
}

fmt.Printf("User \"%s\" password updated.\n", databaseUser.Name)
databaseUser, err = c.DatabaseUserResetPassword(ctx, app, addonUUID, username)

Check failure on line 82 in db/users/update_password.go

View workflow job for this annotation

GitHub Actions / Unit Tests

c.DatabaseUserResetPassword undefined (type *scalingo.Client has no field or method DatabaseUserResetPassword)

Check failure on line 82 in db/users/update_password.go

View workflow job for this annotation

GitHub Actions / golangci-lint on a PR or from a tag

c.DatabaseUserResetPassword undefined (type *scalingo.Client has no field or method DatabaseUserResetPassword) (typecheck)

Check failure on line 82 in db/users/update_password.go

View workflow job for this annotation

GitHub Actions / golangci-lint on a PR or from a tag

c.DatabaseUserResetPassword undefined (type *scalingo.Client has no field or method DatabaseUserResetPassword)) (typecheck)
if err != nil {
return errors.Wrap(ctx, err, "reset the password of the given database user")
}

fmt.Printf("User \"%s\" updated with password \"%s\".\n", databaseUser.Name, databaseUser.Password)
return nil
}

0 comments on commit a62356f

Please sign in to comment.