From b3e3f222114b5c020b66f0fa4b27fbd6b65b4ca6 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Wed, 20 Mar 2024 07:30:59 -0700 Subject: [PATCH] Pass workspace id to import --- src-tauri/src/main.rs | 8 ++++++-- src-web/hooks/useImportData.tsx | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 45682760..78827305 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -722,7 +722,11 @@ async fn cmd_filter_response(w: Window, response_id: &str, filter: &str) -> Resu } #[tauri::command] -async fn cmd_import_data(w: Window, file_path: &str) -> Result { +async fn cmd_import_data( + w: Window, + file_path: &str, + _workspace_id: &str, +) -> Result { let mut result: Option = None; let plugins = vec!["importer-yaak", "importer-insomnia", "importer-postman"]; for plugin_name in plugins { @@ -745,7 +749,7 @@ async fn cmd_import_data(w: Window, file_path: &str) -> Result { const selected = await open(openArgs); @@ -34,6 +36,7 @@ export function useImportData() { grpcRequests: GrpcRequest[]; } = await invoke('cmd_import_data', { filePath: Array.isArray(selected) ? selected[0] : selected, + workspaceId: activeWorkspaceId, }); const importedWorkspace = imported.workspaces[0];