From dfb9870894da23c396766bcb81ccabd1288f4f98 Mon Sep 17 00:00:00 2001 From: Malte Delfs Date: Tue, 29 Jun 2021 18:17:09 +0200 Subject: [PATCH] hotfix --- pages/api/book/[user].ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/api/book/[user].ts b/pages/api/book/[user].ts index 598da06ffa..2ea6611ba2 100644 --- a/pages/api/book/[user].ts +++ b/pages/api/book/[user].ts @@ -9,6 +9,7 @@ import EventAttendeeMail from "../../../lib/emails/EventAttendeeMail"; import { getEventName } from "../../../lib/event"; import { LocationType } from "../../../lib/location"; import merge from "lodash.merge"; +import dayjs from "dayjs"; const translator = short(); @@ -77,7 +78,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) .json({ errorCode: "BookingDateInPast", message: "Attempting to create a meeting in the past." }); } - const currentUser = await prisma.user.findFirst({ + let currentUser = await prisma.user.findFirst({ where: { username: user, },