(cli *cli)
| 937 | } |
| 938 | |
| 939 | func openAppCmd(cli *cli) *cobra.Command { |
| 940 | var inputs struct { |
| 941 | ID string |
| 942 | } |
| 943 | |
| 944 | cmd := &cobra.Command{ |
| 945 | Use: "open", |
| 946 | Args: cobra.MaximumNArgs(1), |
| 947 | Short: "Open the settings page of an application", |
| 948 | Long: "Open an application's settings page in the Auth0 Dashboard.", |
| 949 | Example: ` auth0 apps open |
| 950 | auth0 apps open <app-id>`, |
| 951 | RunE: func(cmd *cobra.Command, args []string) error { |
| 952 | if len(args) == 0 { |
| 953 | if err := appID.Pick(cmd, &inputs.ID, cli.appPickerOptions()); err != nil { |
| 954 | return err |
| 955 | } |
| 956 | } else { |
| 957 | inputs.ID = args[0] |
| 958 | } |
| 959 | |
| 960 | openManageURL(cli, cli.Config.DefaultTenant, formatAppSettingsPath(inputs.ID)) |
| 961 | |
| 962 | return nil |
| 963 | }, |
| 964 | } |
| 965 | |
| 966 | return cmd |
| 967 | } |
| 968 | |
| 969 | func formatAppSettingsPath(id string) string { |
| 970 | if len(id) == 0 { |
no test coverage detected