mirror of https://github.com/status-im/consul.git
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)
|
||||
|
||||
// Fetch
|
||||
options := structs.QueryOptions{Token: reqReal.Token}
|
||||
ctx, err := external.ContextWithQueryOptions(context.Background(), options)
|
||||
ctx, err := external.ContextWithQueryOptions(context.Background(), reqReal.QueryOptions)
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
|
|
|
@ -87,8 +87,7 @@ func (t *TrustBundles) Fetch(_ cache.FetchOptions, req cache.Request) (cache.Fet
|
|||
reqReal.QueryOptions.SetAllowStale(true)
|
||||
|
||||
// Fetch
|
||||
options := structs.QueryOptions{Token: reqReal.Token}
|
||||
ctx, err := external.ContextWithQueryOptions(context.Background(), options)
|
||||
ctx, err := external.ContextWithQueryOptions(context.Background(), reqReal.QueryOptions)
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue