Scheduling infrastructure for absolutely everyone.
import { getHolidayService } from "@calcom/lib/holidays";
import type { TrpcSessionUser } from "@calcom/trpc/server/types";
import type { TGetUserSettingsSchema } from "./getUserSettings.schema";
type GetUserSettingsOptions = {
ctx: {
user: NonNullable<TrpcSessionUser>;
};
input: TGetUserSettingsSchema;
};
export async function getUserSettingsHandler({ ctx }: GetUserSettingsOptions) {
const holidayService = getHolidayService();
return holidayService.getUserSettings(ctx.user.id);
}
export default getUserSettingsHandler;