diff options
author | Oleg Doronin <fortan57@gmail.com> | 2022-06-02 00:17:54 +0300 |
---|---|---|
committer | Oleg Doronin <fortan57@gmail.com> | 2022-06-02 00:17:54 +0300 |
commit | 5424a48cca3b5a79e8431052b74fafb9768e669e (patch) | |
tree | 4df0bdf26374670bc175f15eeed7e50adf572ce6 | |
parent | 746d166a18d80407431565a212317cfc377a3895 (diff) | |
download | ydb-5424a48cca3b5a79e8431052b74fafb9768e669e.tar.gz |
yq-scope has been fixed
ref:2b63e18a5dea4a887fbf3f28506c15fb8b9d9d89
-rw-r--r-- | ydb/public/lib/yq/helpers.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ydb/public/lib/yq/helpers.h b/ydb/public/lib/yq/helpers.h index 10f64dd6a3..21481d2911 100644 --- a/ydb/public/lib/yq/helpers.h +++ b/ydb/public/lib/yq/helpers.h @@ -6,21 +6,20 @@ namespace NYdb { namespace NYq { template<typename T> -T CreateYqSettings(const TString& folderId) +T CreateYqSettings(const TScope& scope) { T settings; - settings.Header_ = {{ "x-yq-scope", TScope::YandexCloudScopeSchema + "://" + folderId }}; // TODO: remove YQ-1055 - settings.Header_ = {{ "x-fq-scope", TScope::YandexCloudScopeSchema + "://" + folderId }}; + settings.Header_ = { + { "x-yq-scope", scope.ToString() }, // TODO: remove YQ-1055 + { "x-fq-scope", scope.ToString() } + }; return settings; } template<typename T> -T CreateYqSettings(const TScope& scope) +T CreateYqSettings(const TString& folderId) { - T settings; - settings.Header_ = {{ "x-yq-scope", scope.ToString() }}; // TODO: remove YQ-1055 - settings.Header_ = {{ "x-fq-scope", scope.ToString() }}; - return settings; + return CreateYqSettings<T>(TScope{TScope::YandexCloudScopeSchema + "://" + folderId}); } } // namespace NYq |