Skip to content

Conversation

theckman
Copy link
Collaborator

@theckman theckman commented Mar 6, 2021

Replaces #262

Updates #267


// AddUserToTeamWithContext adds a user to a team.
func (c *Client) AddUserToTeamWithContext(ctx context.Context, o AddUserToTeamOptions) error {
_, err := c.put(ctx, "/teams/"+o.TeamID+"/users/"+o.UserID, o, nil)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff section above this comment was inspired by #262.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach.

Copy link

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍


// AddUserToTeamWithContext adds a user to a team.
func (c *Client) AddUserToTeamWithContext(ctx context.Context, o AddUserToTeamOptions) error {
_, err := c.put(ctx, "/teams/"+o.TeamID+"/users/"+o.UserID, o, nil)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach.

@stmcallister stmcallister merged commit ae501db into master Mar 17, 2021
@stmcallister stmcallister deleted the ctx_team branch March 17, 2021 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants