diff options
Diffstat (limited to 'cmd/platform/team.go')
-rw-r--r-- | cmd/platform/team.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cmd/platform/team.go b/cmd/platform/team.go index 71bcd543c..4e6a592a7 100644 --- a/cmd/platform/team.go +++ b/cmd/platform/team.go @@ -67,7 +67,9 @@ func init() { } func createTeamCmdF(cmd *cobra.Command, args []string) error { - initDBCommandContextCobra(cmd) + if err := initDBCommandContextCobra(cmd); err != nil { + return err + } name, errn := cmd.Flags().GetString("name") if errn != nil || name == "" { @@ -100,7 +102,9 @@ func createTeamCmdF(cmd *cobra.Command, args []string) error { } func removeUsersCmdF(cmd *cobra.Command, args []string) error { - initDBCommandContextCobra(cmd) + if err := initDBCommandContextCobra(cmd); err != nil { + return err + } if len(args) < 2 { return errors.New("Not enough arguments.") @@ -130,7 +134,9 @@ func removeUserFromTeam(team *model.Team, user *model.User, userArg string) { } func addUsersCmdF(cmd *cobra.Command, args []string) error { - initDBCommandContextCobra(cmd) + if err := initDBCommandContextCobra(cmd); err != nil { + return err + } if len(args) < 2 { return errors.New("Not enough arguments.") @@ -160,7 +166,9 @@ func addUserToTeam(team *model.Team, user *model.User, userArg string) { } func deleteTeamsCmdF(cmd *cobra.Command, args []string) error { - initDBCommandContextCobra(cmd) + if err := initDBCommandContextCobra(cmd); err != nil { + return err + } if len(args) < 1 { return errors.New("Not enough arguments.") |