diff options
Diffstat (limited to 'commands/bridge_token_add.go')
-rw-r--r-- | commands/bridge_token_add.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/commands/bridge_token_add.go b/commands/bridge_token_add.go index 76fed237..7b7a8964 100644 --- a/commands/bridge_token_add.go +++ b/commands/bridge_token_add.go @@ -12,20 +12,18 @@ var ( ) func runBridgeTokenAdd(cmd *cobra.Command, args []string) error { + _ = bridgeToken.Id() // TODO: a better design to avoid doing this + if err := bridgeToken.Validate(); err != nil { return errors.Wrap(err, "invalid token") } - if bridgeToken.Global { - return core.StoreToken(repo, &bridgeToken) - } - - return core.StoreGlobalToken(repo, &bridgeToken) + return core.StoreToken(repo, &bridgeToken) } var bridgeTokenAddCmd = &cobra.Command{ Use: "add", - Short: "Configure and use bridge tokens.", + Short: "Create and store a new token", PreRunE: loadRepo, RunE: runBridgeTokenAdd, Args: cobra.NoArgs, |