1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2024-11-24 08:22:42 +02:00

Fix User.GET() method

According to https://docs.atlassian.com/jira/REST/cloud/#api/2/user-getUser username must be provided as a query string parameter
This commit is contained in:
Pablo Moncada 2016-11-22 22:37:27 +01:00
parent 9d1f282f93
commit 46c9691c07

View File

@ -31,7 +31,7 @@ type User struct {
//
// JIRA API docs: https://docs.atlassian.com/jira/REST/cloud/#api/2/user-getUser
func (s *UserService) Get(username string) (*User, *Response, error) {
apiEndpoint := fmt.Sprintf("/rest/api/2/user/%s", username)
apiEndpoint := fmt.Sprintf("/rest/api/2/user?username=%s", username)
req, err := s.client.NewRequest("GET", apiEndpoint, nil)
if err != nil {
return nil, nil, err