@@ -160,10 +160,10 @@ export class BookingsController_2024_04_15 {
160
160
@Post ( "/" )
161
161
async createBooking (
162
162
@Req ( ) req : BookingRequest ,
163
- @Body ( ) body : CreateBookingInput_2024_04_15
163
+ @Body ( ) body : CreateBookingInput_2024_04_15 ,
164
+ @Headers ( X_CAL_CLIENT_ID ) clientId ?: string
164
165
) : Promise < ApiResponse < Partial < BookingResponse > > > {
165
- const clientIdHeader = req . get ( X_CAL_CLIENT_ID ) ;
166
- const oAuthClientId = clientIdHeader ?. toString ( ) ;
166
+ const oAuthClientId = clientId ?. toString ( ) ;
167
167
const { orgSlug, locationUrl } = body ;
168
168
req . headers [ "x-cal-force-slug" ] = orgSlug ;
169
169
try {
@@ -191,10 +191,10 @@ export class BookingsController_2024_04_15 {
191
191
async cancelBooking (
192
192
@Req ( ) req : BookingRequest ,
193
193
@Param ( "bookingId" ) bookingId : string ,
194
- @Body ( ) _ : CancelBookingInput_2024_04_15
194
+ @Body ( ) _ : CancelBookingInput_2024_04_15 ,
195
+ @Headers ( X_CAL_CLIENT_ID ) clientId ?: string
195
196
) : Promise < ApiResponse < { bookingId : number ; bookingUid : string ; onlyRemovedAttendee : boolean } > > {
196
- const clientIdHeader = req . get ( X_CAL_CLIENT_ID ) ;
197
- const oAuthClientId = clientIdHeader ?. toString ( ) ;
197
+ const oAuthClientId = clientId ?. toString ( ) ;
198
198
if ( bookingId ) {
199
199
try {
200
200
req . body . id = parseInt ( bookingId ) ;
@@ -245,10 +245,10 @@ export class BookingsController_2024_04_15 {
245
245
@Post ( "/recurring" )
246
246
async createRecurringBooking (
247
247
@Req ( ) req : BookingRequest ,
248
- @Body ( ) _ : CreateRecurringBookingInput_2024_04_15 [ ]
248
+ @Body ( ) _ : CreateRecurringBookingInput_2024_04_15 [ ] ,
249
+ @Headers ( X_CAL_CLIENT_ID ) clientId ?: string
249
250
) : Promise < ApiResponse < BookingResponse [ ] > > {
250
- const clientIdHeader = req . get ( X_CAL_CLIENT_ID ) ;
251
- const oAuthClientId = clientIdHeader ?. toString ( ) ;
251
+ const oAuthClientId = clientId ?. toString ( ) ;
252
252
try {
253
253
const recurringEventId = uuidv4 ( ) ;
254
254
for ( const recurringEvent of req . body ) {
@@ -283,10 +283,10 @@ export class BookingsController_2024_04_15 {
283
283
@Post ( "/instant" )
284
284
async createInstantBooking (
285
285
@Req ( ) req : BookingRequest ,
286
- @Body ( ) _ : CreateBookingInput_2024_04_15
286
+ @Body ( ) _ : CreateBookingInput_2024_04_15 ,
287
+ @Headers ( X_CAL_CLIENT_ID ) clientId ?: string
287
288
) : Promise < ApiResponse < Awaited < ReturnType < typeof handleInstantMeeting > > > > {
288
- const clientIdHeader = req . get ( X_CAL_CLIENT_ID ) ;
289
- const oAuthClientId = clientIdHeader ?. toString ( ) ;
289
+ const oAuthClientId = clientId ?. toString ( ) ;
290
290
req . userId = ( await this . getOwnerId ( req ) ) ?? - 1 ;
291
291
try {
292
292
const instantMeeting = await handleInstantMeeting (
0 commit comments