snapshot of https://github.com/mountain-loop/yaak.git (main, 2026-09-23; blobs > 131072B omitted)
This commit is contained in:
12
apps/yaak-client/hooks/useDeleteHttpResponses.ts
Normal file
12
apps/yaak-client/hooks/useDeleteHttpResponses.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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 });
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user