From b660b8a7b8793cd0aeae3b8d4fb7c663d8105ad7 Mon Sep 17 00:00:00 2001 From: Derin Owoade Date: Wed, 28 Dec 2022 12:54:04 +0100 Subject: [PATCH] Vercel json --- pages/api/customerChanges.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/api/customerChanges.tsx b/pages/api/customerChanges.tsx index 3d638e9..0ca5f4f 100644 --- a/pages/api/customerChanges.tsx +++ b/pages/api/customerChanges.tsx @@ -22,7 +22,9 @@ const handler = nextConnect({ const allowCors = (fn: any) => async (req: any, res: any) => { if (req.method === "OPTIONS") { - res.status(200).end(); + res.status(200).json({ + body: "OK", + }); return; } res.setHeader("Access-Control-Allow-Credentials", true);