mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-19 15:21:23 +02:00
A bunch of fixes
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
import type { HttpRequest } from '@yaakapp-internal/models';
|
||||
import { useToast } from './useToast';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
import { useActiveWorkspace } from './useActiveWorkspace';
|
||||
import { getActiveWorkspaceId } from './useActiveWorkspace';
|
||||
import { useCreateHttpRequest } from './useCreateHttpRequest';
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
import { useRequestUpdateKey } from './useRequestUpdateKey';
|
||||
import { useToast } from './useToast';
|
||||
import { useUpdateAnyHttpRequest } from './useUpdateAnyHttpRequest';
|
||||
|
||||
export function useImportCurl() {
|
||||
const workspace = useActiveWorkspace();
|
||||
const updateRequest = useUpdateAnyHttpRequest();
|
||||
const createRequest = useCreateHttpRequest();
|
||||
const { wasUpdatedExternally } = useRequestUpdateKey(null);
|
||||
@@ -23,9 +22,10 @@ export function useImportCurl() {
|
||||
overwriteRequestId?: string;
|
||||
command: string;
|
||||
}) => {
|
||||
const workspaceId = getActiveWorkspaceId();
|
||||
const request: HttpRequest = await invokeCmd('cmd_curl_to_request', {
|
||||
command,
|
||||
workspaceId: workspace?.id,
|
||||
workspaceId,
|
||||
});
|
||||
|
||||
let verb;
|
||||
|
||||
Reference in New Issue
Block a user