Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Commit c6984cb

Browse files
committed
fix(local): use non-local productizer for non-vf nsg basic info requests
1 parent 0420d71 commit c6984cb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/lib/api_app/src/api/routes/testbed/productizers/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ fn build_data_product_uri(data_product: &str, data_source: &str) -> String {
8989
.expect("PRH_MOCK_PRODUCTIZER_ENDPOINT must be set");
9090
}
9191
"draft/NSG/Agent/BasicInformation" => {
92-
testbed_base_url = env::var("PRH_MOCK_PRODUCTIZER_ENDPOINT")
93-
.expect("PRH_MOCK_PRODUCTIZER_ENDPOINT must be set");
92+
if data_source == "virtualfinland" {
93+
testbed_base_url = env::var("PRH_MOCK_PRODUCTIZER_ENDPOINT")
94+
.expect("PRH_MOCK_PRODUCTIZER_ENDPOINT must be set");
95+
}
9496
}
9597
_ => {}
9698
}

src/lib/api_app/src/api/routes/testbed/productizers/nsg/basic_information.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ pub async fn get_nsg_basic_information(request: ParsedRequest) -> APIResponse {
6666
_ => build_data_product_uri(data_product, data_source),
6767
};
6868

69+
log::debug!("Resolved data source: {}", resolved_data_source);
70+
6971
let response = post_json_request::<NSGAgentBasicInformationRequest, JSONValue>(
7072
resolved_data_source,
7173
&request_input,

0 commit comments

Comments
 (0)