* perf: Don't process date overrides outside of requested boundaries * Added ability to skip override calculations when not used * Only instantiating utc date for overrides once * Removed performance tracing * Cleanup * Fixed broken tests * Fix type * In process of fixing types * Types * Fixed types * Removed unnecessary performance.now() call * Changed override date check to use isBetween * Attempting to fix availability test * Put code back to test availability * Put back isBetween because confirmed it wasn't triggering the new test failures * Removed date check to see if this is breaking it * Put the code back since the test failed without it too * Skipping test to unblock pipeline unless research is done * Removed steps to test * Removing the piece around the troubleshooter * 1 more try * Adding an extra wait * Took out the boolean check to see if that's the issue * Put back the check * Trying to isolate the problem * Changed how the test loads the troubleshooter * Changed to OR to capture range better * Using the proper date instead of 1/1/1970 * Update availability.e2e.ts
16 lines
437 B
TypeScript
16 lines
437 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, ...input }, undefined);
|
|
};
|