Don't require project in generated client requests
This commit is contained in:
1 parent
828fee20a1
commit
c6a9c970b0
1 file changed
+6
-1
+6
-1
@@ -689,13 +689,18 @@ func (c *Client) NewRequest(ctx context.Context, method, requestPath string, bod
|
||||
}
|
||||
}
|
||||
|
||||
orgProjPath := path.Join("org", org)
|
||||
if project != "" {
|
||||
orgProjPath = path.Join(orgProjPath, "project", project)
|
||||
}
|
||||
|
||||
req := &http.Request{
|
||||
Method: method,
|
||||
URL: &url.URL{
|
||||
User: u.User,
|
||||
Scheme: u.Scheme,
|
||||
Host: host,
|
||||
Path: path.Join(u.Path, "v1", "org", org, "project", project, requestPath),
|
||||
Path: path.Join(u.Path, "v1", orgProjPath, requestPath),
|
||||
},
|
||||
Host: u.Host,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user