Expose team tRPC endpoint
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
import { createNextApiHandler } from "@calcom/trpc/server/createNextApiHandler";
|
||||||
|
import { teamsRouter } from "@calcom/trpc/server/routers/viewer/teams/_router";
|
||||||
|
|
||||||
|
export default createNextApiHandler(teamsRouter);
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import fs from "node:fs";
|
||||||
|
import path from "node:path";
|
||||||
|
import { ENDPOINTS } from "@calcom/trpc/react/shared";
|
||||||
|
import { describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
describe("team tRPC endpoint", () => {
|
||||||
|
test("registers and exposes the teams router endpoint", () => {
|
||||||
|
expect(ENDPOINTS).toContain("teams");
|
||||||
|
expect(fs.existsSync(path.join(process.cwd(), "apps/web/pages/api/trpc/teams/[trpc].ts"))).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -26,6 +26,7 @@ export const ENDPOINTS = [
|
|||||||
"public",
|
"public",
|
||||||
"timezones",
|
"timezones",
|
||||||
"slots",
|
"slots",
|
||||||
|
"teams",
|
||||||
"travelSchedules",
|
"travelSchedules",
|
||||||
"users",
|
"users",
|
||||||
"viewer",
|
"viewer",
|
||||||
|
|||||||
Reference in New Issue
Block a user