Skip to content

Commit

Permalink
Merge pull request #327 from Malte-D/hotfix/book-user
Browse files Browse the repository at this point in the history
hotfix for api/book/user
  • Loading branch information
baileypumfleet authored Jun 29, 2021
2 parents 51c0556 + dfb9870 commit 3aa1e17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/api/book/[user].ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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,
},
Expand Down

0 comments on commit 3aa1e17

Please sign in to comment.