Commit 7ace41c4 authored by Julien Roland's avatar Julien Roland

[Jobs] Send job query parameter to opt{} instead of manually appending it to url…

[Jobs] Send job query parameter to opt{} instead of manually appending it to url path in download artifacts file
parent 198acc90
......@@ -188,7 +188,13 @@ func (s *JobsService) DownloadArtifactsFile(pid interface{}, refName string, job
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/jobs/artifacts/%s/download?job=%s", url.QueryEscape(project), refName, job)
var q struct {
Job string `url:"job,omitempty" json:"job,omitempty"`
}
q.Job = job
u := fmt.Sprintf("projects/%s/jobs/artifacts/%s/download", url.QueryEscape(project), refName)
req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment