mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* sessionUser in features * update sessionMiddleware * update * format changes * update import paths * fix * fix ts errors * refactor * fix * fix * fix * fix * rename * rename * rename * use error with code objs
11 lines
484 B
TypeScript
11 lines
484 B
TypeScript
import { getSession } from "@calcom/features/auth/lib/userFromSessionUtils";
|
|
import publicProcedure from "../../../procedures/publicProcedure";
|
|
import { ZEventInputSchema } from "../event.schema";
|
|
|
|
export const event = publicProcedure.input(ZEventInputSchema).query(async (opts) => {
|
|
const session = await getSession(opts.ctx);
|
|
const userId = session?.user?.id;
|
|
const { default: handler } = await import("../event.handler");
|
|
return handler({ input: opts.input, userId });
|
|
});
|