use strict zod objects and hide proto on targets

This commit is contained in:
Milo Schwartz
2024-11-14 00:00:17 -05:00
parent 44b932937f
commit ba3505a385
14 changed files with 154 additions and 162 deletions

View File

@@ -10,6 +10,7 @@ import {
import { and, eq, or } from "drizzle-orm";
import createHttpError from "http-errors";
import HttpCode from "@server/types/HttpCode";
import logger from "@server/logger";
export async function verifySiteAccess(
req: Request,
@@ -28,6 +29,7 @@ export async function verifySiteAccess(
}
if (isNaN(siteId)) {
logger.debug(JSON.stringify(req.body));
return next(createHttpError(HttpCode.BAD_REQUEST, "Invalid site ID"));
}