Add page deletion functionality with confirmation dialog and API endpoin

This commit is contained in:
Riccardo Giorato
2025-12-26 21:42:56 +01:00
parent d8f0046c14
commit ddf05e6259
6 changed files with 281 additions and 93 deletions
+4
View File
@@ -141,4 +141,8 @@ export async function getNextPageNumber(storyId: string): Promise<number> {
}
return Math.max(...storyPages.map(p => p.pageNumber)) + 1;
}
export async function deletePage(pageId: string): Promise<void> {
await db.delete(pages).where(eq(pages.id, pageId));
}