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