Skip to content

Commit

Permalink
cli: Deprecate contact-info validation commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspcr committed Jan 16, 2024
1 parent 46b9fd7 commit 3a108c7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cmd/ttn-lw-cli/commands/contact_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ func updateContactInfo(entityID *ttnpb.EntityIdentifiers, updater func([]*ttnpb.
var (
errContactInfoExists = errors.DefineAlreadyExists("contact_info_exists", "contact info already exists")
errMatchingContactInfoNotFound = errors.DefineAlreadyExists("contact_info_not_found", "matching contact info not found")
errNoValidationReference = errors.DefineInvalidArgument("no_validation_reference", "no validation reference set")
errNoValidationToken = errors.DefineInvalidArgument("no_validation_token", "no validation token set")
)

func contactInfoCommands(entity string, getID func(cmd *cobra.Command, args []string) (*ttnpb.EntityIdentifiers, error)) *cobra.Command {
Expand Down Expand Up @@ -228,8 +226,9 @@ func contactInfoCommands(entity string, getID func(cmd *cobra.Command, args []st
},
}
requestValidation := &cobra.Command{
Use: fmt.Sprintf("request-validation [%s-id]", entity),
Short: "Request validation for entity contact info",
Use: fmt.Sprintf("request-validation [%s-id]", entity),
Short: "Request validation for entity contact info (DEPRECATED. Use `user email-validation request` instead.",
Hidden: true,
RunE: func(cmd *cobra.Command, args []string) error {
id, err := getID(cmd, args)
if err != nil {
Expand All @@ -247,9 +246,9 @@ func contactInfoCommands(entity string, getID func(cmd *cobra.Command, args []st
},
}
validate := &cobra.Command{
Use: "validate [reference] [token]",
Short: "Validate contact info",
Long: "Validate contact info by providing the reference and the validation token that you received",
Use: "validate [reference] [token]",
Short: "Validate contact info (DEPRECATED. Use `user email-validation validate` instead.",
Hidden: true,
RunE: func(cmd *cobra.Command, args []string) error {
reference, _ := cmd.Flags().GetString("reference")
token, _ := cmd.Flags().GetString("token")
Expand Down

0 comments on commit 3a108c7

Please sign in to comment.