Skip to content

Scheduling infrastructure for absolutely everyone.

adds app-store to be transpiled to fix build

Agusti Fernandez Pardo1405f7a8615b
diff --git a/next.config.js b/next.config.js
index c6f75ad063d..acf9c9830c9 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,6 +1,11 @@
// https://www.npmjs.com/package/next-transpile-modules
// This makes our @calcom/prisma package from the monorepo to be transpiled and usable by API
-const withTM = require("next-transpile-modules")(["@calcom/prisma", "@calcom/lib", "@calcom/ee"]);
+const withTM = require("next-transpile-modules")([
+ "@calcom/app-store",
+ "@calcom/prisma",
+ "@calcom/lib",
+ "@calcom/ee",
+]);
// use something like withPlugins([withTM], {}) if more plugins added later.
diff --git a/pages/api/booking-references/index.ts b/pages/api/booking-references/index.ts
index bef6acdca10..4fba496dd3c 100644
--- a/pages/api/booking-references/index.ts
+++ b/pages/api/booking-references/index.ts
@@ -67,10 +67,7 @@ async function createOrlistAllBookingReferences(
throw new Error("Invalid request body");
}
- const data = await prisma.bookingReference.create({
- data: { ...safe.data },
- });
- const booking_reference = schemaBookingReferencePublic.parse(data);
+ // const booking_reference = schemaBookingReferencePublic.parse(data);
const userId = await getCalcomUserId(res);
const userWithBookings = await prisma.user.findUnique({
where: { id: userId },
@@ -81,7 +78,10 @@ async function createOrlistAllBookingReferences(
}
const userBookingIds = userWithBookings.bookings.map((booking: any) => booking.id).flat();
if (userBookingIds.includes(safe.data.bookingId)) {
- if (data) {
+ const booking_reference = await prisma.bookingReference.create({
+ data: { ...safe.data },
+ });
+ if (booking_reference) {
res.status(201).json({
booking_reference,
message: "BookingReference created successfully",