From 8d4cc9a9a77c0cdd7ae478c190e7905d059a6637 Mon Sep 17 00:00:00 2001 From: Newton Lomar <40671286+newlomar@users.noreply.github.com> Date: Sun, 27 Oct 2024 17:21:33 -0300 Subject: [PATCH] fixing response status code for no secret or wrong secret (#1397) --- lib/shopify/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shopify/index.ts b/lib/shopify/index.ts index 677b4dd58..1970d94e0 100644 --- a/lib/shopify/index.ts +++ b/lib/shopify/index.ts @@ -435,7 +435,7 @@ export async function revalidate(req: NextRequest): Promise { if (!secret || secret !== process.env.SHOPIFY_REVALIDATION_SECRET) { console.error('Invalid revalidation secret.'); - return NextResponse.json({ status: 200 }); + return NextResponse.json({ status: 401 }); } if (!isCollectionUpdate && !isProductUpdate) {