chore: update dtos for v2 calendars endpoint (#15904)
* init calendars input * update request body input type * fix incorrect naming * update imprts * fixup! update imprts * fixup! fixup! update imprts --------- Co-authored-by: Morgan Vernay <morgan@cal.com>
This commit is contained in:
co-authored by
Morgan Vernay
parent
bd73eba528
commit
a997edd8db
@@ -1,4 +1,5 @@
|
||||
import { CalendarsRepository } from "@/ee/calendars/calendars.repository";
|
||||
import { DeleteCalendarCredentialsInputBodyDto } from "@/ee/calendars/input/delete-calendar-credentials.input";
|
||||
import { GetBusyTimesOutput } from "@/ee/calendars/outputs/busy-times.output";
|
||||
import { ConnectedCalendarsOutput } from "@/ee/calendars/outputs/connected-calendars.output";
|
||||
import {
|
||||
@@ -196,7 +197,7 @@ export class CalendarsController {
|
||||
@HttpCode(HttpStatus.OK)
|
||||
async deleteCalendarCredentials(
|
||||
@Param("calendar") calendar: string,
|
||||
@Body() body: { id: number },
|
||||
@Body() body: DeleteCalendarCredentialsInputBodyDto,
|
||||
@GetUser() user: UserWithProfile
|
||||
): Promise<DeletedCalendarCredentialsOutputResponseDto> {
|
||||
const { id: credentialId } = body;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { Expose } from "class-transformer";
|
||||
import { IsInt } from "class-validator";
|
||||
|
||||
export class DeleteCalendarCredentialsInputBodyDto {
|
||||
@IsInt()
|
||||
@Expose()
|
||||
@ApiProperty({
|
||||
example: 10,
|
||||
description: "Credential ID of the calendar to delete, as returned by the /calendars endpoint",
|
||||
type: "integer",
|
||||
required: true,
|
||||
})
|
||||
readonly id!: number;
|
||||
}
|
||||
Reference in New Issue
Block a user