This commit is contained in:
parent
e0c87cf664
commit
0b7e3510a5
|
@ -149,7 +149,7 @@ const updateMeeting = async (
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteMeeting = async (credential: CredentialPayload, uid: string): Promise<unknown> => {
|
const deleteMeeting = async (credential: CredentialPayload | null, uid: string): Promise<unknown> => {
|
||||||
if (credential) {
|
if (credential) {
|
||||||
const videoAdapter = (await getVideoAdapters([credential]))[0];
|
const videoAdapter = (await getVideoAdapters([credential]))[0];
|
||||||
logger.debug("videoAdapter inside deleteMeeting", { credential, uid });
|
logger.debug("videoAdapter inside deleteMeeting", { credential, uid });
|
||||||
|
|
|
@ -205,10 +205,15 @@ export const requestRescheduleHandler = async ({ ctx, input }: RequestReschedule
|
||||||
if (!bookingRef.uid) return;
|
if (!bookingRef.uid) return;
|
||||||
|
|
||||||
if (bookingRef.type.endsWith("_calendar")) {
|
if (bookingRef.type.endsWith("_calendar")) {
|
||||||
const calendar = await getCalendar(credentialsMap.get(bookingRef.type));
|
const calendar = await getCalendar(
|
||||||
|
credentials.find((cred) => cred.id === bookingRef?.credentialId) || null
|
||||||
|
);
|
||||||
return calendar?.deleteEvent(bookingRef.uid, builder.calendarEvent, bookingRef.externalCalendarId);
|
return calendar?.deleteEvent(bookingRef.uid, builder.calendarEvent, bookingRef.externalCalendarId);
|
||||||
} else if (bookingRef.type.endsWith("_video")) {
|
} else if (bookingRef.type.endsWith("_video")) {
|
||||||
return deleteMeeting(credentialsMap.get(bookingRef.type), bookingRef.uid);
|
return deleteMeeting(
|
||||||
|
credentials.find((cred) => cred?.id === bookingRef?.credentialId) || null,
|
||||||
|
bookingRef.uid
|
||||||
|
);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user