Skip to content

Commit

Permalink
open: remove teams support. ref exercism#956
Browse files Browse the repository at this point in the history
  • Loading branch information
Smarticles101 committed Oct 22, 2020
1 parent 76cf131 commit ce6efb2
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ var openCmd = &cobra.Command{
Short: "Open an exercise on the website.",
Long: `Open the specified exercise to the solution page on the Exercism website.
Find local exercises by slug or team. You can also check for remote exercises.
Alternatively, you can pass a local exercise directory.
Open local or remote exercises by slug. Alternatively, you can pass a local exercise directory.
`,
RunE: func(cmd *cobra.Command, args []string) error {
cfg := config.NewConfig()
Expand Down Expand Up @@ -54,11 +53,6 @@ func runOpen(cfg config.Config, flags *pflag.FlagSet, args []string) error {
return err
}

teamID, err := flags.GetString("team")
if err != nil {
return err
}

remote, err := flags.GetBool("remote")
if err != nil {
return err
Expand Down Expand Up @@ -100,9 +94,6 @@ func runOpen(cfg config.Config, flags *pflag.FlagSet, args []string) error {
if trackID != "" {
q.Add("track_id", trackID)
}
if teamID != "" {
q.Add("team_id", teamID)
}
req.URL.RawQuery = q.Encode()

res, err := client.Do(req)
Expand Down Expand Up @@ -155,10 +146,6 @@ func runOpen(cfg config.Config, flags *pflag.FlagSet, args []string) error {
continue
}

if meta.Team != teamID {
continue
}

matchingExerciseMeta = append(matchingExerciseMeta, meta)
}

Expand Down Expand Up @@ -196,7 +183,6 @@ func setupOpenFlags(flags *pflag.FlagSet) {
flags.BoolP("remote", "r", false, "checks for remote solutions")
flags.StringP("track", "t", "", "the track id")
flags.StringP("exercise", "e", "", "the exercise slug")
flags.StringP("team", "T", "", "the team slug")
}

func init() {
Expand Down

0 comments on commit ce6efb2

Please sign in to comment.