diff --git a/apps/api/v2/src/ee/me/me.controller.e2e-spec.ts b/apps/api/v2/src/ee/me/me.controller.e2e-spec.ts index d96bf283e9..8b6b0ad9d4 100644 --- a/apps/api/v2/src/ee/me/me.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/me/me.controller.e2e-spec.ts @@ -65,7 +65,7 @@ describe("Me Endpoints", () => { it("should get user associated with access token", async () => { return request(app.getHttpServer()) - .get("/api/v2/me") + .get("/api/v2/ee/me") .expect(200) .then((response) => { const responseBody: ApiSuccessResponse = response.body; @@ -84,7 +84,7 @@ describe("Me Endpoints", () => { const body: UpdateManagedPlatformUserInput = { timeZone: "Europe/Rome" }; return request(app.getHttpServer()) - .patch("/api/v2/me") + .patch("/api/v2/ee/me") .send(body) .expect(200) .then(async (response) => { @@ -108,19 +108,22 @@ describe("Me Endpoints", () => { it("should not update user associated with access token given invalid timezone", async () => { const bodyWithIncorrectTimeZone: UpdateManagedPlatformUserInput = { timeZone: "Narnia/Woods" }; - return request(app.getHttpServer()).patch("/api/v2/me").send(bodyWithIncorrectTimeZone).expect(400); + return request(app.getHttpServer()).patch("/api/v2/ee/me").send(bodyWithIncorrectTimeZone).expect(400); }); it("should not update user associated with access token given invalid time format", async () => { const bodyWithIncorrectTimeFormat: UpdateManagedPlatformUserInput = { timeFormat: 100 }; - return request(app.getHttpServer()).patch("/api/v2/me").send(bodyWithIncorrectTimeFormat).expect(400); + return request(app.getHttpServer()) + .patch("/api/v2/ee/me") + .send(bodyWithIncorrectTimeFormat) + .expect(400); }); it("should not update user associated with access token given invalid week start", async () => { const bodyWithIncorrectWeekStart: UpdateManagedPlatformUserInput = { weekStart: "waba luba dub dub" }; - return request(app.getHttpServer()).patch("/api/v2/me").send(bodyWithIncorrectWeekStart).expect(400); + return request(app.getHttpServer()).patch("/api/v2/ee/me").send(bodyWithIncorrectWeekStart).expect(400); }); afterAll(async () => { diff --git a/apps/api/v2/src/ee/me/me.controller.ts b/apps/api/v2/src/ee/me/me.controller.ts index 0cb9216771..c2ae834b0b 100644 --- a/apps/api/v2/src/ee/me/me.controller.ts +++ b/apps/api/v2/src/ee/me/me.controller.ts @@ -12,7 +12,7 @@ import { UserResponse, userSchemaResponse } from "@calcom/platform-types"; import { ApiResponse } from "@calcom/platform-types"; @Controller({ - path: "me", + path: "ee/me", version: "2", }) @UseGuards(AccessTokenGuard, PermissionsGuard) diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index f6e8124b07..2e6f3078a9 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -903,7 +903,7 @@ } } }, - "/api/v2/me": { + "/api/v2/ee/me": { "get": { "operationId": "MeController_getMe", "parameters": [], diff --git a/packages/platform/constants/api.ts b/packages/platform/constants/api.ts index 1f0b0c7744..b36d1715df 100644 --- a/packages/platform/constants/api.ts +++ b/packages/platform/constants/api.ts @@ -1,7 +1,7 @@ export const BASE_URL = "http://localhost:5555"; export const API_VERSION = "v2"; export const V2_ENDPOINTS = { - me: "me", + me: "ee/me", availability: "schedules", eventTypes: "event-types", bookings: "ee/bookings",