Files
yaak-mountain-loop/apps/yaak-client/hooks/useDeleteHttpResponses.ts
T

13 lines
384 B
TypeScript

import { rpc } from "../lib/rpc";
import { useFastMutation } from "./useFastMutation";
export function useDeleteHttpResponses(requestId?: string) {
return useFastMutation({
mutationKey: ["delete_http_responses", requestId],
mutationFn: async () => {
if (requestId === undefined) return;
await rpc("cmd_delete_all_http_responses", { requestId });
},
});
}