fix: delete read progress for real

This commit is contained in:
Julien Froidefond
2025-02-23 07:52:44 +01:00
parent f04202a4ee
commit 995ec455f7
2 changed files with 21 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ export async function PATCH(request: Request, { params }: { params: { bookId: st
}
export async function DELETE(request: Request, { params }: { params: { bookId: string } }) {
try {
await BookService.updateReadProgress(params.bookId, 1, false);
await BookService.deleteReadProgress(params.bookId);
return NextResponse.json({ message: "Progression supprimée avec succès" });
} catch (error) {
console.error("API Delete Read Progress - Erreur:", error);