Add page deletion functionality with confirmation dialog and API endpoin
This commit is contained in:
@@ -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));
|
||||
}
|
||||
Reference in New Issue
Block a user