next/lib/client/storyActions.ts

7 lines
189 B
TypeScript
Raw Permalink Normal View History

import { useApiFetch } from "#imports";
export async function deleteStory(id: number) {
await useApiFetch(`/story/${id}`, { method: "delete" });
await navigateTo("/my-stuff/stories");
}