Merge pull request #327 from Malte-D/hotfix/book-user

hotfix for api/book/user
pull/331/head
Bailey Pumfleet 2021-06-29 17:20:49 +01:00 committed by GitHub
commit 3aa1e1716d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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,
},