Agenda refactor
This commit is contained in:
parent
d9c78d8125
commit
60e82eb535
@ -27,8 +27,8 @@ export async function getInfomaniakCalDAVClient(
|
|||||||
password: string
|
password: string
|
||||||
): Promise<WebDAVClient> {
|
): Promise<WebDAVClient> {
|
||||||
// Infomaniak CalDAV base URL (from Infomaniak sync assistant)
|
// Infomaniak CalDAV base URL (from Infomaniak sync assistant)
|
||||||
// Base URL is https://sync.infomaniak.com, CalDAV endpoint is accessed via /caldav path
|
// The actual CalDAV endpoint is at /caldav path
|
||||||
const baseUrl = 'https://sync.infomaniak.com';
|
const baseUrl = 'https://sync.infomaniak.com/caldav';
|
||||||
|
|
||||||
const client = createClient(baseUrl, {
|
const client = createClient(baseUrl, {
|
||||||
username: email,
|
username: email,
|
||||||
@ -48,8 +48,8 @@ export async function discoverInfomaniakCalendars(
|
|||||||
try {
|
try {
|
||||||
const client = await getInfomaniakCalDAVClient(email, password);
|
const client = await getInfomaniakCalDAVClient(email, password);
|
||||||
|
|
||||||
// List all calendars using PROPFIND on /caldav path
|
// List all calendars using PROPFIND on root
|
||||||
const items = await client.getDirectoryContents('/caldav');
|
const items = await client.getDirectoryContents('/');
|
||||||
|
|
||||||
const calendars: CalDAVCalendar[] = [];
|
const calendars: CalDAVCalendar[] = [];
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user