mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 14:06:59 +00:00
Update revalidate paths again
This commit is contained in:
parent
804d6f8212
commit
9f23f9aadc
@ -26,15 +26,7 @@ export async function POST(request: NextRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const slug = requestData.slug;
|
const slug = requestData.slug;
|
||||||
const locale = requestData.locale;
|
const pathToRevalidate = slug
|
||||||
const type = requestData.type;
|
|
||||||
let pathToRevalidate = "";
|
|
||||||
|
|
||||||
if (type === "home") {
|
|
||||||
pathToRevalidate = `${slug}`
|
|
||||||
} else {
|
|
||||||
pathToRevalidate = `/${locale}${slug}`
|
|
||||||
}
|
|
||||||
|
|
||||||
revalidatePath(pathToRevalidate);
|
revalidatePath(pathToRevalidate);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user