* refactor: Move @calcom/core to @calcom/lib * Merging imports * Clean up * Ignoreing type error for now
19 lines
480 B
TypeScript
19 lines
480 B
TypeScript
import { getUserAvailability } from "@calcom/lib/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
|
|
);
|
|
};
|