fixing response status code for no secret or wrong secret (#1397)

This commit is contained in:
Newton Lomar 2024-10-27 17:21:33 -03:00 committed by GitHub
parent ce004c05fa
commit 8d4cc9a9a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -435,7 +435,7 @@ export async function revalidate(req: NextRequest): Promise<NextResponse> {
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) {