Use existing query options to build ctx

This commit is contained in:
freddygv 2022-10-06 11:14:55 -06:00
parent 77ab28c5c7
commit d54db25421
2 changed files with 2 additions and 4 deletions

View File

@ -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
}

View File

@ -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
}