Co-authored-by: alishaz-polymath <[email protected]> Co-authored-by: Syed Ali Shahbaz <[email protected]>
22 lines
415 B
TypeScript
22 lines
415 B
TypeScript
import { prisma } from "@calcom/prisma";
|
|
|
|
import type { TNoShowInputSchema } from "./noShow.schema";
|
|
|
|
type NoShowOptions = {
|
|
input: TNoShowInputSchema;
|
|
};
|
|
|
|
export const noShowHandler = async ({ input }: NoShowOptions) => {
|
|
const { bookingUid } = input;
|
|
await prisma.booking.update({
|
|
where: {
|
|
uid: bookingUid,
|
|
},
|
|
data: {
|
|
noShowHost: true,
|
|
},
|
|
});
|
|
};
|
|
|
|
export default noShowHandler;
|