api: include Consul token in job revert API (#13065)

This commit is contained in:
Tim Gross 2022-05-19 11:30:29 -04:00 committed by GitHub
parent 89c72d74d7
commit b72ff42ada
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

3
.changelog/13065.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
api: Fixed a bug where Consul token was not respected for job revert API
```

View File

@ -441,8 +441,8 @@ func (j *Jobs) Revert(jobID string, version uint64, enforcePriorVersion *uint64,
JobID: jobID, JobID: jobID,
JobVersion: version, JobVersion: version,
EnforcePriorVersion: enforcePriorVersion, EnforcePriorVersion: enforcePriorVersion,
// ConsulToken: consulToken, // TODO(shoenig) enable! ConsulToken: consulToken,
VaultToken: vaultToken, VaultToken: vaultToken,
} }
wm, err := j.client.write("/v1/job/"+url.PathEscape(jobID)+"/revert", req, &resp, q) wm, err := j.client.write("/v1/job/"+url.PathEscape(jobID)+"/revert", req, &resp, q)
if err != nil { if err != nil {