Merge branch 'main' into bugfix/zoom-invalid-token
This commit is contained in:
3 files changed
+42
-16
No files matched your search
@@ -67,7 +67,17 @@ const getLocationRequestFromIntegration = ({ location }: GetLocationRequestFromI
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse): Promise<void> {
|
||||
const { user } = req.query;
|
||||
|
||||
let currentUser = await prisma.user.findFirst({
|
||||
const isTimeInPast = (time) => {
|
||||
return dayjs(time).isBefore(new Date(), "day");
|
||||
};
|
||||
|
||||
if (isTimeInPast(req.body.start)) {
|
||||
return res
|
||||
.status(400)
|
||||
.json({ errorCode: "BookingDateInPast", message: "Attempting to create a meeting in the past." });
|
||||
}
|
||||
|
||||
const currentUser = await prisma.user.findFirst({
|
||||
where: {
|
||||
username: user,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user