mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-10 03:16:07 +08:00
Use opts in get (list) client (#194)
This commit is contained in:
committed by
Victor Vrantchan
parent
3bceb796c7
commit
bff40d2479
@@ -43,6 +43,7 @@ func NewClient(instance string, logger log.Logger, token string, opts ...httptra
|
||||
copyURL(u, "/v1/blueprints"),
|
||||
encodeRequestWithToken(token, EncodeHTTPGenericRequest),
|
||||
DecodeGetBlueprintsResponse,
|
||||
opts...,
|
||||
).Endpoint()
|
||||
}
|
||||
var getProfilesEndpoint endpoint.Endpoint
|
||||
@@ -52,6 +53,7 @@ func NewClient(instance string, logger log.Logger, token string, opts ...httptra
|
||||
copyURL(u, "/v1/profiles"),
|
||||
encodeRequestWithToken(token, EncodeHTTPGenericRequest),
|
||||
DecodeGetProfilesResponse,
|
||||
opts...,
|
||||
).Endpoint()
|
||||
}
|
||||
|
||||
@@ -62,6 +64,7 @@ func NewClient(instance string, logger log.Logger, token string, opts ...httptra
|
||||
copyURL(u, "/v1/dep/account"),
|
||||
encodeRequestWithToken(token, EncodeHTTPGenericRequest),
|
||||
DecodeDEPAccountInfoResponse,
|
||||
opts...,
|
||||
).Endpoint()
|
||||
}
|
||||
|
||||
@@ -72,6 +75,7 @@ func NewClient(instance string, logger log.Logger, token string, opts ...httptra
|
||||
copyURL(u, "/v1/dep/devices"),
|
||||
encodeRequestWithToken(token, EncodeHTTPGenericRequest),
|
||||
DecodeDEPDeviceDetailsReponse,
|
||||
opts...,
|
||||
).Endpoint()
|
||||
}
|
||||
|
||||
@@ -82,6 +86,7 @@ func NewClient(instance string, logger log.Logger, token string, opts ...httptra
|
||||
copyURL(u, "/v1/dep/profiles"),
|
||||
encodeRequestWithToken(token, EncodeHTTPGenericRequest),
|
||||
DecodeDEPProfileResponse,
|
||||
opts...,
|
||||
).Endpoint()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user