Files
Benny JooandGitHub 9855176948 refactor: Remove all TrpcSessionUser usages in @calcom/features (#27853)
* 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
2026-02-24 09:29:54 +00:00

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 });
});