mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
11 lines
476 B
TypeScript
11 lines
476 B
TypeScript
import { getSession } from "../../../middlewares/sessionMiddleware";
|
|
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 });
|
|
});
|