From 46c9691c072fdc2fcc74291553381d9c76913c10 Mon Sep 17 00:00:00 2001 From: Pablo Moncada Date: Tue, 22 Nov 2016 22:37:27 +0100 Subject: [PATCH] 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 --- user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user.go b/user.go index fb33c95..7a9762c 100644 --- a/user.go +++ b/user.go @@ -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