From 75a09859bc4ec990905291ec37210ad0f3a07646 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Mon, 3 Jun 2024 14:00:40 -0700 Subject: [PATCH] Move Postman to first plugin --- src-tauri/src/lib.rs | 8 ++++---- src-web/components/FormUrlencodedEditor.tsx | 2 ++ src-web/components/UrlParameterEditor.tsx | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 6d0ddf3b..1bc5203e 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -752,16 +752,16 @@ async fn cmd_import_data( ) -> Result { let mut result: Option = None; let plugins = vec![ - "importer-yaak", - "importer-insomnia", "importer-postman", + "importer-insomnia", + "importer-yaak", "importer-curl", ]; - let file = fs::read_to_string(file_path) + let file = read_to_string(file_path) .unwrap_or_else(|_| panic!("Unable to read file {}", file_path)); let file_contents = file.as_str(); for plugin_name in plugins { - let v = plugin::run_plugin_import(&w.app_handle(), plugin_name, file_contents) + let v = run_plugin_import(&w.app_handle(), plugin_name, file_contents) .await .map_err(|e| e.to_string())?; if let Some(r) = v { diff --git a/src-web/components/FormUrlencodedEditor.tsx b/src-web/components/FormUrlencodedEditor.tsx index 7780895b..80ca6816 100644 --- a/src-web/components/FormUrlencodedEditor.tsx +++ b/src-web/components/FormUrlencodedEditor.tsx @@ -30,6 +30,8 @@ export function FormUrlencodedEditor({ body, forceUpdateKey, onChange }: Props)