-
Notifications
You must be signed in to change notification settings - Fork 77
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
refactor: form to json review #163
base: main
Are you sure you want to change the base?
Conversation
plans, _, err := apiClient.ServiceApi.ServicePlans(context.Background(), serviceName, &tsuru.ServicePlansOpts{ | ||
Pool: optional.NewString(c.pool), | ||
}) | ||
plans, _, err := apiClient.ServiceApi.ServicePlans(context.Background(), serviceName, &tsuru.ServicePlansOpts{Pool: optional.NewString(c.pool)}) |
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.
@CarlosRoGuerra do you prefer one line instead of break lines ?
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.
I prefer it with break line, I think when correcting some things I must have left it that way accidentally
…pdate in volume.go and changePassword in auth.go
return errors.New("User creation is disabled.") | ||
} | ||
userData := c.userData(ctx, password) | ||
response, err := apiClient.UserApi.UserCreate(context.TODO(), userData) |
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.
you should remove context.TODO()
userData := c.userData(ctx, password) | ||
response, err := apiClient.UserApi.UserCreate(context.TODO(), userData) | ||
if err != nil { | ||
return 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.
why did you remove the "method not allowed" check?
tsuru/client/auth.go
Outdated
if err != nil { | ||
return err | ||
} | ||
request.Header.Set("Content-Type", "application/x-www-form-urlencoded") | ||
_, err = client.Do(request) | ||
changePassword := c.ChangePassword(old, new, confirm) |
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.
this variable name does not make any sense... changePassword->changedPassword or changePassword->newPassword
Codecov Report
@@ Coverage Diff @@
## master #163 +/- ##
==========================================
+ Coverage 66.29% 66.94% +0.65%
==========================================
Files 48 48
Lines 9011 8962 -49
==========================================
+ Hits 5974 6000 +26
+ Misses 2116 2077 -39
+ Partials 921 885 -36
Continue to review full report at Codecov.
|
c7fe320
to
8d5a611
Compare
21736d5
to
811c43b
Compare
Commands: