Try to list calendars, if not continue (#10720)
Co-authored-by: Omar López <zomars@me.com>pull/10728/head
parent
ceb18167cf
commit
8356cb7d34
|
@ -304,6 +304,7 @@ export const deleteCredentialHandler = async ({ ctx, input }: DeleteCredentialOp
|
|||
|
||||
// If it's a calendar remove it from the SelectedCalendars
|
||||
if (credential.app?.categories.includes(AppCategories.calendar)) {
|
||||
try {
|
||||
const calendar = await getCalendar(credential);
|
||||
|
||||
const calendars = await calendar?.listCalendars();
|
||||
|
@ -321,6 +322,9 @@ export const deleteCredentialHandler = async ({ ctx, input }: DeleteCredentialOp
|
|||
});
|
||||
});
|
||||
}
|
||||
} catch {
|
||||
console.log(`Error deleting selected calendars for user ${user.id} and calendar ${credential.appId}`);
|
||||
}
|
||||
}
|
||||
|
||||
// if zapier get disconnected, delete zapier apiKey, delete zapier webhooks and cancel all scheduled jobs from zapier
|
||||
|
|
Loading…
Reference in New Issue