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

Commit a3536a2

Browse files
committed
refactor: simplify special case uri parsing
1 parent 687b303 commit a3536a2

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

  • src/lib/api_app/src/api/routes/testbed/productizers

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ fn parse_testbed_request_headers(request: ParsedRequest) -> Result<HeaderMap, AP
2020
"authorization",
2121
request.headers
2222
.get("authorization")
23-
.ok_or_else(|| APIRoutingError::UnprocessableEntity("No authorization header".to_string()))?
23+
.ok_or_else(||
24+
APIRoutingError::UnprocessableEntity("No authorization header".to_string())
25+
)?
2426
.clone()
2527
);
2628

@@ -65,11 +67,7 @@ fn build_data_product_uri(data_product: &str, data_source: &str) -> String {
6567
::var("USER_STATUS_INFO_PRODUCTIZER_ENDPOINT")
6668
.expect("USER_STATUS_INFO_PRODUCTIZER_ENDPOINT must be set");
6769
}
68-
_ => {
69-
testbed_base_url = env
70-
::var("TESTBED_BASE_URL")
71-
.expect("TESTBED_BASE_URL must be set");
72-
}
70+
_ => {}
7371
}
7472
}
7573

0 commit comments

Comments
 (0)