Update to 15 RC 2

This commit is contained in:
Lee Robinson
2024-10-15 22:07:55 -05:00
parent 694c5c17ba
commit 64ca2ac790
18 changed files with 1167 additions and 589 deletions

View File

@@ -428,7 +428,7 @@ export async function revalidate(req: NextRequest): Promise<NextResponse> {
// otherwise it will continue to retry the request.
const collectionWebhooks = ['collections/create', 'collections/delete', 'collections/update'];
const productWebhooks = ['products/create', 'products/delete', 'products/update'];
const topic = headers().get('x-shopify-topic') || 'unknown';
const topic = (await headers()).get('x-shopify-topic') || 'unknown';
const secret = req.nextUrl.searchParams.get('secret');
const isCollectionUpdate = collectionWebhooks.includes(topic);
const isProductUpdate = productWebhooks.includes(topic);