Files
calendar/packages/trpc/server/routers/viewer/availability/user.handler.ts
T
Keith WilliamsandGitHub ed6d88e30f perf: Allow bypassing 3rd party calendar busy times (#17492)
* perf: Allow bypassing 3rd party calendar busy times

* Fix typing issues

* Fixed API v1 build

* Another fix for API v1
2024-11-05 12:31:33 -03:00

19 lines
481 B
TypeScript

import { getUserAvailability } from "@calcom/core/getUserAvailability";
import type { TrpcSessionUser } from "../../../trpc";
import type { TUserInputSchema } from "./user.schema";
type UserOptions = {
ctx: {
user: NonNullable<TrpcSessionUser>;
};
input: TUserInputSchema;
};
export const userHandler = async ({ input }: UserOptions) => {
return getUserAvailability(
{ returnDateOverrides: true, bypassBusyCalendarTimes: false, ...input },
undefined
);
};