Update revalidate path

This commit is contained in:
Henrik Larsson
2023-07-07 13:10:00 +02:00
parent 7ebcc1f24b
commit 67bd84ebf9
2 changed files with 3 additions and 3 deletions

View File

@@ -31,9 +31,9 @@ export async function POST(request: NextRequest) {
let pathToRevalidate = "";
if (type === "home") {
pathToRevalidate = `/${locale}`
pathToRevalidate = `${locale}`
} else {
pathToRevalidate = `/${locale}${slug}`
pathToRevalidate = `${locale}${slug}`
}
revalidatePath(pathToRevalidate);