Skip to content

Commit

Permalink
refactor: form to json
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosRoGuerra committed Oct 19, 2021
1 parent 93fd277 commit 8d5a611
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
7 changes: 0 additions & 7 deletions .vscode/launch.json

This file was deleted.

3 changes: 0 additions & 3 deletions tsuru/client/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,13 @@ func (c *UserCreate) Run(ctx *cmd.Context, client *cmd.Client) error {
if err != nil {
return err
}

if response != nil {
if response.StatusCode == http.StatusNotFound ||
response.StatusCode == http.StatusMethodNotAllowed {
return errors.New("User creation is disabled.")
}
}

err = cmd.StreamJSONResponse(ctx.Stdout, response)

if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ func (c *RoleDefaultRemove) Run(context *cmd.Context, client *cmd.Client) error
}
encodedParams := params.Encode()
if encodedParams == "" {
return fmt.Errorf("You must choose which event to remove default roles.")
return fmt.Errorf("You must choose which event to remove default roles")
}
addr, err := cmd.GetURL(fmt.Sprintf("/role/default?%s", encodedParams))
if err != nil {
Expand Down

0 comments on commit 8d5a611

Please sign in to comment.