Skip to content

Commit

Permalink
Merge pull request #202 from OpsLevel/db/bugfix-user-identifier-input…
Browse files Browse the repository at this point in the history
…-needs-pointers

update UserIdentifierInput struct inputs to pointers
  • Loading branch information
davidbloss authored Nov 10, 2023
2 parents 75c3310 + e6b91ac commit bc596a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Bugfix-20231110-141748.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Bugfix
body: update UserIdentifierInput to accept pointers, matches updates to opslevel-go
time: 2023-11-10T14:17:48.981065-06:00
4 changes: 2 additions & 2 deletions src/cmd/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var createMemberCmd = &cobra.Command{
common.WasFound(team.Id == "", key)

teamMembershipUserInput := opslevel.TeamMembershipUserInput{
User: opslevel.UserIdentifierInput{Email: email},
User: opslevel.NewUserIdentifier(email),
Role: role,
}
_, addErr := getClientGQL().AddMemberships(&team.TeamId, teamMembershipUserInput)
Expand Down Expand Up @@ -244,7 +244,7 @@ var deleteMemberCmd = &cobra.Command{
common.WasFound(team.Id == "", key)

teamMembershipUserInput := opslevel.TeamMembershipUserInput{
User: opslevel.UserIdentifierInput{Email: email},
User: opslevel.NewUserIdentifier(email),
}
_, removeErr := getClientGQL().RemoveMemberships(&team.TeamId, teamMembershipUserInput)
cobra.CheckErr(removeErr)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ EOF
continue
}
newMembership := opslevel.TeamMembershipUserInput{
User: opslevel.UserIdentifierInput{Email: user.Email},
User: opslevel.NewUserIdentifier(email),
Role: string(user.Role),
}
_, err = getClientGQL().AddMemberships(&t.TeamId, newMembership)
Expand Down

0 comments on commit bc596a0

Please sign in to comment.