From 9a65c547dcab2dde15668a65420f658c1fb8d069 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Fri, 7 Oct 2022 13:24:55 +0530 Subject: [PATCH] Adds missing return after res --- pages/api/schedules/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/api/schedules/index.ts b/pages/api/schedules/index.ts index 3b8abc776f..86faad4181 100644 --- a/pages/api/schedules/index.ts +++ b/pages/api/schedules/index.ts @@ -18,6 +18,7 @@ async function createOrlistAllSchedules( body = safeParseJSON(body); if (!body.success) { res.status(400).json({ message: body.message }); + return; } const safe = schemaScheduleBodyParams.safeParse(body);