Fix graphql instrospection

This commit is contained in:
Gregory Schier
2023-05-29 12:31:34 -07:00
parent 6decba8a4a
commit 465ccdd2b2
10 changed files with 228 additions and 117 deletions

View File

@@ -233,7 +233,10 @@ async fn actually_send_ephemeral_request(
let dir = app_handle.path_resolver().app_data_dir().unwrap();
let base_dir = dir.join("responses");
create_dir_all(base_dir.clone()).expect("Failed to create responses dir");
let body_path = base_dir.join(response.id.clone());
let body_path = match response.id == "" {
false => base_dir.join(response.id.clone()),
true => base_dir.join(uuid::Uuid::new_v4().to_string()),
};
let mut f = File::options()
.create(true)
.truncate(true)