Skip to content

Commit

Permalink
Removed unecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Toms Zacharia authored and Toms Zacharia committed Nov 12, 2024
1 parent 1021507 commit 18cea96
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/cmd/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,26 +99,20 @@ var listUserCmd = &cobra.Command{
Example: `
opslevel list user
opslevel list user --ignore-deactivated
opslevel list user --deactivated
opslevel list user -o json | jq 'map({"key": .Name, "value": .Role}) | from_entries'
`,
Run: func(cmd *cobra.Command, args []string) {
// payloadVars should remain nil if '--ignore-deactivated' or --deactivated not set
// payloadVars should remain nil if '--ignore-deactivated'
var payloadVars *opslevel.PayloadVariables

ignoreDeactivated, err := cmd.Flags().GetBool("ignore-deactivated")
// deactivated, err := cmd.Flags().GetBool("deactivated")
cobra.CheckErr(err)

client := getClientGQL()
if ignoreDeactivated {
payloadVars = client.InitialPageVariablesPointer().WithoutDeactivedUsers()
}

//if deactivated {
// payloadVars = client.InitialPageVariablesPointer().DeactivedUsers()
//}

resp, err := getClientGQL().ListUsers(payloadVars)
cobra.CheckErr(err)
list := resp.Nodes
Expand Down Expand Up @@ -259,7 +253,6 @@ EOF
func init() {
createUserCmd.Flags().Bool("skip-welcome-email", false, "If this flag is set the welcome e-mail will be skipped from being sent")
listUserCmd.Flags().Bool("ignore-deactivated", false, "If this flag is set only return active users")
//listUserCmd.Flags().Bool("deactivated", false, "If this flag is set only return deactivated users")

exampleCmd.AddCommand(exampleUserCmd)
createCmd.AddCommand(createUserCmd)
Expand Down

0 comments on commit 18cea96

Please sign in to comment.