Files
calendar/packages/trpc/server/routers/loggedInViewer/markNoShow.handler.ts
T
Udit TakkarandGitHub e075dcdeaa feat: create new markNoShow endpoint (#15738)
* feat: create new markNoShow endpoint

* chore: add schema

* chore: update name

* chore: save progress

* refactor: improve code and types

* fix: unit test

* chore: improvements

* chore: move query to booking repository

* fix: type error
2024-08-07 15:16:31 +05:30

24 lines
569 B
TypeScript

import handleMarkNoShow from "@calcom/features/handleMarkNoShow";
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
import type { TNoShowInputSchema } from "./markNoShow.schema";
type NoShowOptions = {
input: TNoShowInputSchema;
ctx: {
user: NonNullable<TrpcSessionUser>;
};
};
export const markNoShow = async ({ ctx, input }: NoShowOptions) => {
const { bookingUid, attendees, noShowHost } = input;
return handleMarkNoShow({
bookingUid,
attendees,
noShowHost,
userId: ctx.user.id,
locale: ctx.user.locale,
});
};