Files
cal.diy/packages/trpc/server/routers/apps/basecamp3/_router.ts
T
Benny Joo 92eb41c117 refactor: Migrate trpc routers in App store package to Trpc package (#23536)
* migrate trpc routers in app package to trpc package

* delete

* delete

* delete

* fix

* fix

* fix

* format

* format

* fix

* fix

* fix

* fix

* remove unused file

* fix

* fix

* wip
2025-09-07 22:17:33 -03:00

27 lines
1.0 KiB
TypeScript

import authedProcedure from "@calcom/trpc/server/procedures/authedProcedure";
import { router } from "@calcom/trpc/server/trpc";
import { ZProjectMutationInputSchema } from "./projectMutation.schema";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const UNSTABLE_HANDLER_CACHE: any = {};
const appBasecamp3 = router({
projects: authedProcedure.query(async ({ ctx }) => {
if (!UNSTABLE_HANDLER_CACHE.projects) {
UNSTABLE_HANDLER_CACHE.projects = await import("./projects.handler").then((mod) => mod.projectHandler);
}
return UNSTABLE_HANDLER_CACHE.projects({ ctx });
}),
projectMutation: authedProcedure.input(ZProjectMutationInputSchema).mutation(async ({ ctx, input }) => {
if (!UNSTABLE_HANDLER_CACHE.projectMutation) {
UNSTABLE_HANDLER_CACHE.projectMutation = await import("./projectMutation.handler").then(
(mod) => mod.projectMutationHandler
);
}
return UNSTABLE_HANDLER_CACHE.projectMutation({ ctx, input });
}),
});
export default appBasecamp3;