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
6687a950ed
commit
fcacaf189a
@ -27,12 +27,13 @@ export async function POST(request: NextRequest) {
|
|||||||
|
|
||||||
const slug = requestData.slug;
|
const slug = requestData.slug;
|
||||||
const type = requestData.type;
|
const type = requestData.type;
|
||||||
|
const locale = requestData.locale;
|
||||||
let pathToRevalidate = "";
|
let pathToRevalidate = "";
|
||||||
|
|
||||||
if (type === 'home') {
|
if (type === 'home') {
|
||||||
pathToRevalidate = slug;
|
pathToRevalidate = slug;
|
||||||
} else {
|
} else {
|
||||||
pathToRevalidate = slug;
|
pathToRevalidate = locale + slug;
|
||||||
}
|
}
|
||||||
|
|
||||||
revalidatePath(pathToRevalidate);
|
revalidatePath(pathToRevalidate);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user