Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Keith Williams <[email protected]> Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Kiran K <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: sean-brydon <[email protected]> Co-authored-by: zomars <[email protected]> Co-authored-by: Carina Wollendorfer <[email protected]>
25 lines
1018 B
TypeScript
25 lines
1018 B
TypeScript
import authedOrgAdminProcedure from "@calcom/trpc/server/procedures/authedProcedure";
|
|
import { router, importHandler } from "@calcom/trpc/server/trpc";
|
|
|
|
import { ZCreateInputSchema } from "./create.schema";
|
|
import { ZDeleteInputSchema } from "./delete.schema";
|
|
|
|
const NAMESPACE = "teamGroupMapping";
|
|
|
|
const namespaced = (s: string) => `${NAMESPACE}.${s}`;
|
|
|
|
export const teamGroupMappingRouter = router({
|
|
get: authedOrgAdminProcedure.query(async (opts) => {
|
|
const handler = await importHandler(namespaced("get"), () => import("./get.handler"));
|
|
return handler(opts);
|
|
}),
|
|
create: authedOrgAdminProcedure.input(ZCreateInputSchema).mutation(async (opts) => {
|
|
const handler = await importHandler(namespaced("create"), () => import("./create.handler"));
|
|
return handler(opts);
|
|
}),
|
|
delete: authedOrgAdminProcedure.input(ZDeleteInputSchema).mutation(async (opts) => {
|
|
const handler = await importHandler(namespaced("delete"), () => import("./delete.handler"));
|
|
return handler(opts);
|
|
}),
|
|
});
|