Co-authored-by: alishaz-polymath <alishahbaz7@gmail.com> Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
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;
|