mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
Use existing query options to build ctx
This commit is contained in:
parent
77ab28c5c7
commit
d54db25421
@ -83,8 +83,7 @@ func (t *TrustBundle) Fetch(_ cache.FetchOptions, req cache.Request) (cache.Fetc
|
|||||||
reqReal.QueryOptions.SetAllowStale(true)
|
reqReal.QueryOptions.SetAllowStale(true)
|
||||||
|
|
||||||
// Fetch
|
// Fetch
|
||||||
options := structs.QueryOptions{Token: reqReal.Token}
|
ctx, err := external.ContextWithQueryOptions(context.Background(), reqReal.QueryOptions)
|
||||||
ctx, err := external.ContextWithQueryOptions(context.Background(), options)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
@ -87,8 +87,7 @@ func (t *TrustBundles) Fetch(_ cache.FetchOptions, req cache.Request) (cache.Fet
|
|||||||
reqReal.QueryOptions.SetAllowStale(true)
|
reqReal.QueryOptions.SetAllowStale(true)
|
||||||
|
|
||||||
// Fetch
|
// Fetch
|
||||||
options := structs.QueryOptions{Token: reqReal.Token}
|
ctx, err := external.ContextWithQueryOptions(context.Background(), reqReal.QueryOptions)
|
||||||
ctx, err := external.ContextWithQueryOptions(context.Background(), options)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user