-
Notifications
You must be signed in to change notification settings - Fork 55
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 apps [CLI-15] #111
Conversation
@@ -265,7 +265,7 @@ auth0 apis update --id id --name myapi | |||
cmd.Flags().StringVarP(&flags.ID, apiID, "i", "", "ID of the API.") | |||
cmd.Flags().StringVarP(&flags.Name, apiName, "n", "", "Name of the API.") | |||
cmd.Flags().StringVarP(&flags.Scopes, apiScopes, "s", "", "Space-separated list of scopes.") | |||
mustRequireFlags(cmd, apiID, apiName) | |||
mustRequireFlags(cmd, apiID) |
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.
Q: we don't need apiName because it's optional for creation?
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.
It's optional for update
(you can update any property). For create it's required.
err := ansi.Spinner("Deleting API", func() error { | ||
return ansi.Spinner("Deleting API", func() error { | ||
return cli.api.ResourceServer.Delete(flags.ID) | ||
}) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil |
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.
#winning
internal/display/clients.go
Outdated
// TODO(cyx): determine if there's a better way to filter this out. | ||
const deprecatedAppName = "All Applications" | ||
|
||
func appTypeFor(v *string) string { | ||
func typeFor(v *string) string { |
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.
Given this is in the same display
package scope typeFor
might not make sense. If we do plan to split up packages later, it would make sense then. What do you think?
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.
Yes, the idea is to split it later into packages. But will change it back for now.
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.
Changed in 47b5645
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.
Just a Q re: typeFor
otherwise thanks for doing this 👍 💪
Description
clients.go
toapps.go
clients
as an aliasapps delete
apps update
so the basic CRUD is now completeapps create
https://user-images.githubusercontent.com/5055789/109328681-7ae10100-7838-11eb-8507-ced24545b6ac.mov
apps update
https://user-images.githubusercontent.com/5055789/109328732-8cc2a400-7838-11eb-8380-2ef47bd8dd9c.mov
apps delete
https://user-images.githubusercontent.com/5055789/109328803-a106a100-7838-11eb-88e3-4e691b4ed04e.mov
Testing
Checklist
master