Add missing JSON header to Client.AddCollaborator (#306)

Add missing JSON header to `Client.AddCollaborator`

Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/306
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
seelensonne 2020-04-07 14:26:05 +00:00 committed by techknowlogick
parent 9f10a2b902
commit 2f920dbb01

View file

@ -47,7 +47,7 @@ func (c *Client) AddCollaborator(user, repo, collaborator string, opt AddCollabo
if err != nil { if err != nil {
return err return err
} }
_, err = c.getResponse("PUT", fmt.Sprintf("/repos/%s/%s/collaborators/%s", user, repo, collaborator), nil, bytes.NewReader(body)) _, err = c.getResponse("PUT", fmt.Sprintf("/repos/%s/%s/collaborators/%s", user, repo, collaborator), jsonHeader, bytes.NewReader(body))
return err return err
} }