fix: passing booking id in the payload (#15642)

This commit is contained in:
Udit Takkar authored and GitHub committed 2024-07-03 07:25:14 +00:00
1 parent 92bf1ee3c7
commit 4f76d4468e
3 files changed
+4

No files matched your search

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