Revert "pin api version in DeviceClient.ListDevicePolicies (#6139)" (#6163)

This reverts commit 4d184ef583.
This commit is contained in:
Roberto Dip 2022-06-09 20:35:40 -03:00 committed by GitHub
parent a15101601c
commit 3bcd4e4ca6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,7 @@ func NewDeviceClient(addr string, token string, insecureSkipVerify bool, rootCA
// ListDevicePolicies fetches all policies for the device with the provided token
func (dc *DeviceClient) ListDevicePolicies() ([]*fleet.HostPolicy, error) {
verb, path := "GET", "/api/2022-04/fleet/device/"+dc.token+"/policies"
verb, path := "GET", "/api/latest/fleet/device/"+dc.token+"/policies"
var responseBody listDevicePoliciesResponse
err := dc.request(verb, path, "", &responseBody)
if err != nil {