fix: passing booking id in the payload (#15642)
This commit is contained in:
@@ -109,6 +109,7 @@ test.describe("Bookings", () => {
|
||||
message: "first@cal.com marked as no-show",
|
||||
attendees: [{ email: "first@cal.com", noShow: true, utcOffset: null }],
|
||||
bookingUid: bookingWhereFirstUserIsOrganizer?.uid,
|
||||
bookingId: bookingWhereFirstUserIsOrganizer?.id,
|
||||
},
|
||||
});
|
||||
webhookReceiver.close();
|
||||
|
||||
@@ -32,6 +32,7 @@ export type WithUTCOffsetType<T> = T & {
|
||||
export type BookingNoShowUpdatedPayload = {
|
||||
message: string;
|
||||
bookingUid: string;
|
||||
bookingId: number;
|
||||
attendees: { email: string; noShow: boolean }[];
|
||||
};
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ export const noShowHandler = async ({ input }: NoShowOptions) => {
|
||||
const booking = await prisma.booking.findUnique({
|
||||
where: { uid: bookingUid },
|
||||
select: {
|
||||
id: true,
|
||||
eventType: {
|
||||
select: {
|
||||
id: true,
|
||||
@@ -103,6 +104,7 @@ export const noShowHandler = async ({ input }: NoShowOptions) => {
|
||||
// @ts-expect-error payload is too booking specific, we need to refactor this
|
||||
message: t(payload.message, { x: payload.attendees[0]?.email || "User" }),
|
||||
bookingUid,
|
||||
bookingId: booking?.id,
|
||||
});
|
||||
return payload;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user