+1








1b5d50c45c
Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Kiran K <mailtokirankk@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
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);
|
|
}),
|
|
});
|