fix: revalidate /libraries cache after settings updates
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 42s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 42s
Add revalidatePath("/libraries") to the monitoring, metadata-provider
and reading-status-provider route handlers so that saving library
settings invalidates the Next.js data cache and the page reflects
fresh data on reload.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { revalidatePath } from "next/cache";
|
||||
import { NextResponse } from "next/server";
|
||||
import { apiFetch } from "@/lib/api";
|
||||
|
||||
@@ -13,6 +14,7 @@ export async function PATCH(
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
revalidatePath("/libraries");
|
||||
return NextResponse.json(data);
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : "Failed to update reading status provider";
|
||||
|
||||
Reference in New Issue
Block a user