cal/lib/integrations.ts
Alex van Andel 8010abf15a
Adds Office 365 / Outlook.com Calendar Integration
* Added MS_GRAPH_CLIENT_* credentials to .env.example.
* Refactored the google integration into an abstraction layer for creating events and getting the user schedule from either Google or Office 365.
* FIX: when re-authorizing the Google Integration the refresh_token would no longer be set and the google integration would stop working.
* Updated Office 365 integration image
2021-04-21 23:10:48 +01:00

18 lines
419 B
TypeScript

export function getIntegrationName(name: String) {
switch(name) {
case "google_calendar":
return "Google Calendar";
case "office365_calendar":
return "Office 365 Calendar";
default:
return "Unknown";
}
}
export function getIntegrationType(name: String) {
if (name.endsWith('_calendar')) {
return 'Calendar';
}
return "Unknown";
}