Fixed some routing and introspection requests

This commit is contained in:
Gregory Schier
2023-10-25 21:53:18 -07:00
parent 2f998ddfb6
commit 2f64f45aba
8 changed files with 2076 additions and 7274 deletions

View File

@@ -83,9 +83,13 @@ async fn actually_send_ephemeral_request(
let environments = find_environments(&request.workspace_id, pool)
.await
.expect("Failed to find environments");
let environment: models::Environment = environments.first().unwrap().clone();
let mut url_string = render::render(&request.url, environment.clone());
// TODO: Use active environment
let environment = environments.first();
let mut url_string = match environment {
Some(e) => render::render(&request.url, e.clone()),
None => request.url.to_string(),
};
if !url_string.starts_with("http://") && !url_string.starts_with("https://") {
url_string = format!("http://{}", url_string);