Skip to content

Scheduling infrastructure for absolutely everyone.

Hotfix/schedule (#174)

Syed Ali Shahbazf5d953ef1cf8
diff --git a/pages/api/schedules/[id].ts b/pages/api/schedules/[id].ts
index 59c78ea12bf..9dbb75470a9 100644
--- a/pages/api/schedules/[id].ts
+++ b/pages/api/schedules/[id].ts
@@ -16,6 +16,7 @@ export async function scheduleById(
body = safeParseJSON(body);
if (!body.success) {
res.status(400).json({ message: body.message });
+ return;
}
const safeBody = schemaSingleScheduleBodyParams.safeParse(body);
diff --git a/pages/api/schedules/index.ts b/pages/api/schedules/index.ts
index 86faad4181f..10536f5cea1 100644
--- a/pages/api/schedules/index.ts
+++ b/pages/api/schedules/index.ts
@@ -16,7 +16,7 @@ async function createOrlistAllSchedules(
res: NextApiResponse<SchedulesResponse | ScheduleResponse>
) {
body = safeParseJSON(body);
- if (!body.success) {
+ if (body.success !== undefined && !body.success) {
res.status(400).json({ message: body.message });
return;
}