Refactored batch route.

This commit is contained in:
Mike Cao 2025-02-28 16:58:57 -08:00
parent 3f00d88668
commit a8835f385e
4 changed files with 42 additions and 44 deletions

View file

@ -1,4 +1,4 @@
import { ZodObject } from 'zod';
import { ZodSchema } from 'zod';
import { FILTER_COLUMNS } from '@/lib/constants';
import { badRequest, unauthorized } from '@/lib/response';
import { getAllowedUnits, getMinimumUnit } from '@/lib/date';
@ -15,7 +15,7 @@ export async function getJsonBody(request: Request) {
export async function parseRequest(
request: Request,
schema?: ZodObject<any>,
schema?: ZodSchema,
options?: { skipAuth: boolean },
): Promise<any> {
const url = new URL(request.url);