Skip to content

Commit

Permalink
fix: API v2 recurring spelling (#14620)
Browse files Browse the repository at this point in the history
  • Loading branch information
keithwillcode committed Apr 16, 2024
1 parent 9dd2dbf commit ae64d7b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions apps/api/v2/src/app.rewrites.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export class RewriterMiddleware implements NestMiddleware {
if (req.url.startsWith("/v2/ee")) {
req.url = req.url.replace("/v2/ee", "/v2");
}
if (req.url.contains("reccuring")) {
req.url = req.url.replace("reccuring", "recurring");
}
next();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ describe("Bookings Endpoints", () => {
// };

// return request(app.getHttpServer())
// .post("/v2/bookings/reccuring")
// .post("/v2/bookings/recurring")
// .send(body)
// .expect(201)
// .then((response) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CreateBookingInput } from "@/ee/bookings/inputs/create-booking.input";
import { CreateReccuringBookingInput } from "@/ee/bookings/inputs/create-reccuring-booking.input";
import { CreateRecurringBookingInput } from "@/ee/bookings/inputs/create-recurring-booking.input";
import { GetBookingOutput } from "@/ee/bookings/outputs/get-booking.output";
import { GetBookingsOutput } from "@/ee/bookings/outputs/get-bookings.output";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
Expand Down Expand Up @@ -180,10 +180,10 @@ export class BookingsController {
throw new InternalServerErrorException("Could not cancel booking.");
}

@Post("/reccuring")
async createReccuringBooking(
@Post("/recurring")
async createRecurringBooking(
@Req() req: BookingRequest,
@Body() _: CreateReccuringBookingInput[],
@Body() _: CreateRecurringBookingInput[],
@Headers(X_CAL_CLIENT_ID) clientId?: string
): Promise<ApiResponse<BookingResponse[]>> {
const oAuthClientId = clientId?.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IsBoolean, IsNumber, IsOptional } from "class-validator";

import type { AppsStatus } from "@calcom/platform-libraries";

export class CreateReccuringBookingInput extends CreateBookingInput {
export class CreateRecurringBookingInput extends CreateBookingInput {
@IsBoolean()
@IsOptional()
noEmail?: boolean;
Expand Down
6 changes: 3 additions & 3 deletions apps/api/v2/swagger/documentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1380,9 +1380,9 @@
]
}
},
"/v2/bookings/reccuring": {
"/v2/bookings/recurring": {
"post": {
"operationId": "BookingsController_createReccuringBooking",
"operationId": "BookingsController_createRecurringBooking",
"parameters": [
{
"name": "x-cal-client-id",
Expand Down Expand Up @@ -4270,4 +4270,4 @@
}
}
}
}
}
6 changes: 3 additions & 3 deletions packages/platform/sdk/src/swagger-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export interface paths {
"/v2/bookings": {
post: operations["BookingsController_createBooking"];
};
"/v2/bookings/reccuring": {
post: operations["BookingsController_createReccuringBooking"];
"/v2/bookings/recurring": {
post: operations["BookingsController_createRecurringBooking"];
};
"/v2/bookings/instant": {
post: operations["BookingsController_createInstantBooking"];
Expand Down Expand Up @@ -814,7 +814,7 @@ export interface operations {
};
};
};
BookingsController_createReccuringBooking: {
BookingsController_createRecurringBooking: {
requestBody: {
content: {
"application/json": string[];
Expand Down

0 comments on commit ae64d7b

Please sign in to comment.