diff --git a/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts b/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts index bb2e35ba83..cd17f220bf 100644 --- a/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts +++ b/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts @@ -52,11 +52,7 @@ import { APPLE_CALENDAR, CREDENTIAL_CALENDARS, } from "@calcom/platform-constants"; -import type { - ApiResponse, - CalendarBusyTimesInput, - CreateCalendarCredentialsInput, -} from "@calcom/platform-types"; +import { ApiResponse, CalendarBusyTimesInput, CreateCalendarCredentialsInput } from "@calcom/platform-types"; import type { User } from "@calcom/prisma/client"; export interface CalendarState { diff --git a/packages/platform/types/calendars/inputs/create-calendar-credentials.input.ts b/packages/platform/types/calendars/inputs/create-calendar-credentials.input.ts index ebfae0e420..1eeaa87c8e 100644 --- a/packages/platform/types/calendars/inputs/create-calendar-credentials.input.ts +++ b/packages/platform/types/calendars/inputs/create-calendar-credentials.input.ts @@ -1,14 +1,17 @@ import { ApiProperty } from "@nestjs/swagger"; +import { Transform } from "class-transformer"; import { IsString, MinLength } from "class-validator"; export class CreateCalendarCredentialsInput { @IsString() @MinLength(1) @ApiProperty() + @Transform(({ value }) => value?.trim()) username!: string; @IsString() @MinLength(1) @ApiProperty() + @Transform(({ value }) => value?.trim()) password!: string; }