* refactor: getUserAvailability into service with DI * chore: bump platform libs * disable bull queue in e2e for bookings * chore: bump platform libs * chore: bump platform libs * fix: should update event type bookingFields test --------- Co-authored-by: Alex van Andel <me@alexvanandel.com>
20 lines
591 B
TypeScript
20 lines
591 B
TypeScript
import { getUserAvailabilityService } from "@calcom/lib/di/containers/get-user-availability";
|
|
|
|
import type { TrpcSessionUser } from "../../../types";
|
|
import type { TUserInputSchema } from "./user.schema";
|
|
|
|
type UserOptions = {
|
|
ctx: {
|
|
user: NonNullable<TrpcSessionUser>;
|
|
};
|
|
input: TUserInputSchema;
|
|
};
|
|
|
|
export const userHandler = async ({ input }: UserOptions) => {
|
|
const userAvailabilityService = getUserAvailabilityService()
|
|
return userAvailabilityService.getUserAvailability(
|
|
{ returnDateOverrides: true, bypassBusyCalendarTimes: false, ...input },
|
|
undefined
|
|
);
|
|
};
|