MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / isValidBody

Function isValidBody

supabase/functions/execute-code-2/index.ts:292–303  ·  view source on GitHub ↗
(
  body: any,
  bodySchema: z.ZodType<any>,
)

Source from the content-addressed store, hash-verified

290});
291
292export function isValidBody<T extends Record<string, unknown>>(
293 body: any,
294 bodySchema: z.ZodType<any>,
295): body is T {
296 const safeParseOut = bodySchema.safeParse(body);
297 if ("error" in safeParseOut) {
298 console.error(
299 "Error parsing request body: " + safeParseOut.error.toString(),
300 );
301 }
302 return safeParseOut.success;
303}
304
305const monthNames = [
306 "January",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected