(deps commandDeps, workspaceRef *string)
| 1063 | } |
| 1064 | |
| 1065 | func newNetworkUnmuteCommand(deps commandDeps, workspaceRef *string) *cobra.Command { |
| 1066 | var flags networkSubscriptionFlags |
| 1067 | cmd := &cobra.Command{ |
| 1068 | Use: "unmute", |
| 1069 | Short: "Remove one network delivery preference", |
| 1070 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 1071 | client, err := clientFromDeps(deps) |
| 1072 | if err != nil { |
| 1073 | return err |
| 1074 | } |
| 1075 | workspace, err := resolveNetworkWorkspaceRef(cmd, deps, client, workspaceRef) |
| 1076 | if err != nil { |
| 1077 | return err |
| 1078 | } |
| 1079 | if err := client.DeleteNetworkSubscription( |
| 1080 | cmd.Context(), |
| 1081 | workspace, |
| 1082 | strings.TrimSpace(flags.channel), |
| 1083 | strings.TrimSpace(flags.peerID), |
| 1084 | strings.TrimSpace(flags.threadID), |
| 1085 | ); err != nil { |
| 1086 | return err |
| 1087 | } |
| 1088 | return writeCommandOutput(cmd, networkSubscriptionDeleteBundle(flags.channel, flags.threadID, flags.peerID)) |
| 1089 | }, |
| 1090 | } |
| 1091 | registerNetworkSubscriptionMutationFlags(cmd, &flags, false) |
| 1092 | return cmd |
| 1093 | } |
| 1094 | |
| 1095 | func registerNetworkSubscriptionMutationFlags( |
| 1096 | cmd *cobra.Command, |
no test coverage detected