mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
Update revalidate paths again
This commit is contained in:
parent
7ba66b9947
commit
1136e08c64
@ -5,6 +5,8 @@ import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
const SANITY_WEBHOOK_SECRET = `${process.env.SANITY_WEBHOOK_SECRET}`;
|
||||
|
||||
export const runtime = 'edge'
|
||||
|
||||
export async function POST(request: NextRequest) {
|
||||
// Await the response from our request.
|
||||
const requestData = await request.json();
|
||||
@ -32,7 +34,7 @@ export async function POST(request: NextRequest) {
|
||||
if (type === 'home') {
|
||||
pathToRevalidate = slug;
|
||||
} else {
|
||||
pathToRevalidate = slug;
|
||||
pathToRevalidate = '[...slug]';
|
||||
}
|
||||
|
||||
revalidatePath(pathToRevalidate);
|
||||
|
Loading…
x
Reference in New Issue
Block a user