* 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
24 lines
569 B
TypeScript
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,
|
|
});
|
|
};
|