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