Merge production to main

pull/2710/head
zomars 2022-05-23 09:29:19 -06:00
parent 38f23986ad
commit 3a1d8b8183
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const user = asStringOrNull(req.query.user);
const dateFrom = dayjs(asStringOrNull(req.query.dateFrom));
const dateTo = dayjs(asStringOrNull(req.query.dateTo));
const eventTypeId = parseInt(asStringOrNull(req.query.eventTypeId) || "");
const eventTypeId = typeof req.query.eventTypeId === "string" ? parseInt(req.query.eventTypeId) : undefined;
if (!dateFrom.isValid() || !dateTo.isValid()) {
return res.status(400).json({ message: "Invalid time range given." });